antlr-kotlin
antlr-kotlin copied to clipboard
Grammar with string interpolation confuses kotlin compiler
I'm new to antlr, so perhaps I'm doing something wrong. I'm trying to write a grammar for a language with string interpolation like kotlin by starting from the MiniCalc
example. Changing INTERPOLATION_OPEN
from #{
into ${
it seems to generate invalid kotlin code:
LITERAL_NAMES
list contains "'${'"
I suppose this needs escaping in the code generator or is there another way around this? I'd be happy to contribute if pointed in the right direction.