Nodeclipse/coffeescript-eclipse

/"/ and /'/ are not parsed correctly

scharf opened this issue · 1 comments

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