/"/ and /'/ are not parsed correctly
scharf opened this issue · 1 comments
scharf commented
There is a missing rule for simple regular expressions in the parser
Here is my proposal for a better rule for regular expressions:
terminal REGEX:
'///' -> '///' |
'/' ( (!('/'|'\\') | ('\\' !('\n' | '\r'))) ('\\' !('\n' | '\r') | !('\\'|"'"))*)? '/';
the github syntax highlighter does coffeesctipt highlighting of regular expressions correctly:
x=/'/
y=///
'
///
y=/\Yaaaa/
scharf commented
I just fixed the rule -- there was a problem with //\ because the first character was not seen as quote