AST testing

This commit is contained in:
Michael Schimmel
2025-11-23 00:24:43 +01:00
parent c5167b8550
commit a052dfb20f
23 changed files with 792 additions and 1260 deletions
+3 -2
View File
@@ -531,7 +531,7 @@ begin
if (expr.Kind = akVariableDeclaration) then
begin
var decl := expr.AsVariableDeclaration;
definitions.Add(decl.Identifier.Name, decl.Initializer);
definitions.Add(decl.Target.AsIdentifier.Name, decl.Initializer);
end
// Handle macro definitions inside the block
else if expr.Kind = akMacroDefinition then
@@ -546,7 +546,7 @@ begin
else if rootNode.Kind = akVariableDeclaration then // Handle single definition
begin
var decl := rootNode.AsVariableDeclaration;
definitions.Add(decl.Identifier.Name, decl.Initializer);
definitions.Add(decl.Target.AsIdentifier.Name, decl.Initializer);
end
// Handle a single macro definition
else if rootNode.Kind = akMacroDefinition then
@@ -825,6 +825,7 @@ begin
);
// Execute with RootScope as parent.
//TODO Endlosschleife in HandleTCO
result := ExecuteAst(root);
sw.Stop;