Grammar-Kit icon indicating copy to clipboard operation
Grammar-Kit copied to clipboard

Whitespace field not generated in elementTypeHolderClass

Open amynbe opened this issue 4 years ago • 0 comments

https://github.com/JetBrains/Grammar-Kit/blob/master/TUTORIAL.md says:

the LivePreviewLexer treats as whitespace any space or new-line matching regexp token that is not used anywhere in the rules.

However, as soon as I remove all mentions of a given rule in the bnf, the IElementType disappears from the elementTypeHolderClass (XxxTypes.java) and I can't reference it in my ParserDefinition.getWhitespaceTokens.

This means I can't have an accurate LivePreviewLexer and code that compiles at the same time, is this known/expected behaviour?

amynbe avatar May 08 '21 00:05 amynbe