Resolved dependency between AST nodes and scope

This commit is contained in:
Michael Schimmel
2025-11-05 16:52:40 +01:00
parent b98e7d98e6
commit 0915d6d90d
5 changed files with 170 additions and 100 deletions
+1 -2
View File
@@ -214,11 +214,10 @@ end;
function TForm1.CompileAst(const ANode: IAstNode; const AParentScope: IExecutionScope; out ADescriptor: IScopeDescriptor): IAstNode;
var
macroDescriptor: IScopeDescriptor;
expandedAst, boundAst, typedAst, loweredAst: IAstNode;
begin
// Step 1: Expand macros (Phase 1)
expandedAst := TMacroExpander.ExpandMacros(AParentScope, ANode, macroDescriptor, CreateEvaluator);
expandedAst := TMacroExpander.ExpandMacros(AParentScope, ANode, CreateEvaluator);
// Step 2: Bind names and addresses (Phase 2)
boundAst := TAstBinder.Bind(AParentScope, expandedAst, ADescriptor);