MarkusAmshove / natls

Language Server implementation for the Natural 4GL programming language
MIT License
12 stars 3 forks source link

Add label identifier to END-* inlay hints #482

Open MarkusAmshove opened 2 months ago

MarkusAmshove commented 2 months ago
L1. FOR...
...
END-FOR /* show L1. here
MarkusAmshove commented 1 month 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: