The following code does not register correctly:
procedure Test;
label MyLabel;
begin
goto MyLabel;
MyLabel: ; <<-- no node is created for this line.
end;
Here's the fix
procedure TPasSyntaxTreeBuilder.LabeledStatement;
var
Temp: TSyntaxNode;
begin
FStack.PushValuedNode(ntLabeledStatement, Lexer.Token);
try
inherited;
finally
FStack.Pop;
end;
end;
The following code does not register correctly:
Here's the fix