Open scharf opened 11 years ago
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/
I just fixed the rule -- there was a problem with \//\ because the first character was not seen as quote
There is a missing rule for simple regular expressions in the parser
Here is my proposal for a better rule for regular expressions:
the github syntax highlighter does coffeesctipt highlighting of regular expressions correctly: