AST testing
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user