Open MarkusAmshove opened 2 months ago
Currently labels like L1.
just float around in the AST without being attached to any statement.
We could add an ILabeledStatement
to the statements that can have labels.
When the parser encounters a LABEL_IDENTIFIER
, it should then go and look at the next token to parse the statement (e.g. in labeledStatement()
). After the statement has been parsed, it can add the label to the statement.
These statements can be labeled: