But the point was that the real problem is the parser, and that should be fixed to be smarter, as you say:
- see $$
- scan until first non-keyword character
- now look it up in the keyword table
- if not keyword skip string to $$
This part of the parser is quite tricky. The strings starting with `$$` are just a special case but the general one is ``` $SOME_STRING$real string here$SOME_STRING$ ``` where `SOME_STRING` is an arbitrary prefix (and suffix), possibly empty, leading to `$$string$$` delimiting the string both at the beginning and the end. So you have to detect these guys, the keyword guys and the code isn't completely trivial, especially when you consider that inside these strings you can have sequences of characters that normally mean comments like `--`, which is a start of a line comment: 1. `$$keyword-- this is a comment` 2. `$$non_keyword-- this is a contents of a string until double dollar`
Not undoable, but I just don't want to be the one writing the proper fix ;-).