Skip to content

Labeled statement does not register #227

Description

@JBontes

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;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions