refactor: separate parser and compiler AST node structures

Simplified the AST architecture by removing the overly complex Node<K,
  T> structure and replacing it with specialized types for
  each phase:

   - Introduced UntypedNode in nodes.rs for the Parser and Macro system,
     eliminating redundant ty: () initializations.
   - Defined a new generic Node<T> in bound_nodes.rs for all compiler
     stages, where T represents the phase-specific metadata.
   - Updated the Binder to act as the bridge between UntypedNode and
     Node<()>.
   - Simplified type aliases: TypedNode, AnalyzedNode, and ExecNode now
     leverage the streamlined Node<T> structure.
   - Updated Parser, Macros, Type-Checker, Optimizer, and VM to reflect
     the architectural changes.
   - Fixed import chains and resolved needless borrows via clippy.

  This change improves type safety, reduces boilerplate code in the
  parser, and makes the compiler stages more idiomatic and
  readable.
This commit is contained in:
Michael Schimmel
2026-03-13 13:16:03 +01:00
parent bf86c76bb6
commit 7d72a99fa1
19 changed files with 2574 additions and 2566 deletions
+4
View File
@@ -74,3 +74,7 @@ Options:
* Dieses Dokument sollte aktuell gehalten werden.
@docs/BNF.md
# Repository
@repomix-output.xml