I am contributing to the Intellij plugin for the AEM platform.
I am implementing custom language for HTL (Sightly) based on HTML.
However, it provides 2 actual versions: 1.3 and 1.4. In 1.4 they introduced new operators for expression language. It requires changes to my parser and lexer to support 'in' operator in language. For completion I can implement check for HTL language version, but for operator I can't understand how to do it.
As a workaround, I can modify bnf and lexer to support new relational operator and implement Annotator to mark it as not supported in the older version. For completion, documentation and other stuff I am going to inject some conditions to check project HTL version.
Can you please suggest another approach how can I easily build custom language syntax depending on HTL version? Maybe some mixins, etc...