Skip to content

/"/ and /'/ are not parsed correctly #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
scharf opened this issue Jul 17, 2013 · 1 comment
Open

/"/ and /'/ are not parsed correctly #11

scharf opened this issue Jul 17, 2013 · 1 comment
Assignees

Comments

@scharf
Copy link

scharf commented Jul 17, 2013

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
Copy link
Author

scharf commented Jul 18, 2013

I just fixed the rule -- there was a problem with //\ because the first character was not seen as quote

@ghost ghost assigned scharf Jul 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant