-
My whitespace language grammar patterns I've used in Xtext for years for YAML similar grammars does not appear to jive with Langium's 3.2.0 implementation of indendation. I'm trying to get YAML lists as:
.. and it's not working at all. I've confirmed npm has langium 3.2.0 installed. yo generated the extension folder with 3.2.0. My VSCode langium extension is at 3.1.1 (newer not available but grammar highlights fine without errors). Grammar generates and builds fine. Launch debug VSCode and it does not work as expected. The grammar:
And basically every single whitespace item possible is failing when I run this in debug mode: With this text:
I get the '-' after boms highlighted as error with: Expecting token of type 'INDENT' but found |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @blewis13, did you remember to register the |
Beta Was this translation helpful? Give feedback.
-
Yes, that was what I was missing and the link to the recipe explained it well. Thanks for your help! |
Beta Was this translation helpful? Give feedback.
Hi @blewis13, did you remember to register the
IndentationAwareTokenBuilder
andLexer
in your parser services?The instructions to do so are available in this (yet to be published) recipe: eclipse-langium/langium-website#246