Refactoring node to be immutable

This commit is contained in:
Michael Schimmel
2025-11-05 15:15:12 +01:00
parent 218bd9f506
commit 25984fe61a
7 changed files with 537 additions and 371 deletions
+2 -2
View File
@@ -451,9 +451,9 @@ begin
definitions := TDictionary<string, IAstNode>.Create;
try
// Check if the root is a block and extract top-level definitions
if rootNode is TBlockExpressionNode then
if rootNode.Kind = akBlockExpression then
begin
for var expr in (rootNode as TBlockExpressionNode).Expressions do
for var expr in rootNode.AsBlockExpression.Expressions do
begin
if expr is TVariableDeclarationNode then
begin