eclipse-langium / langium

Next-gen language engineering / DSL framework
https://langium.org/
MIT License
725 stars 65 forks source link

Allow usage of hidden tokens in terminal lookahead #1336

Closed msujew closed 8 months ago

msujew commented 9 months ago

Right now, the Langium validation marks usage of hidden tokens inside of the terminal lookahead (?=...) with an error. This makes writing these lookaheads quite annoying, especially if you want to allow comments inside of them.

https://github.com/eclipse-langium/langium/blob/fee533f9c655cc245801e66b0d935c7b02a0e009/packages/langium/src/grammar/validation/validator.ts#L478-L489