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
+2 -2
View File
@@ -60,7 +60,7 @@ end;
function TAstToTextVisitor.VisitAssignment(const Node: IAssignmentNode): string;
begin
Result := Node.Identifier.Name + ' := ' + Accept(Node.Value);
Result := Accept(Node.Target) + ' := ' + Accept(Node.Value);
end;
function TAstToTextVisitor.VisitBlockExpression(const Node: IBlockExpressionNode): string;
@@ -259,7 +259,7 @@ begin
initStr := ' := ' + Accept(Node.Initializer)
else
initStr := '';
Result := 'var ' + Node.Identifier.Name + initStr;
Result := 'var ' + Accept(Node.Target) + initStr;
end;
end.