Skip to content
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

Syntax highlighting after pattern with start condition and escaped quote incorrect #1

Closed
rveerd opened this issue Apr 28, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@rveerd
Copy link

rveerd commented Apr 28, 2020

In the following Lex input file syntax highlighting stops working correctly after the pattern in the rule returning "STRING":

NUMBER      [0-9]+
ID          [$A-Za-z_][$0-9A-Za-z_]*
DOTTED_ID   {ID}("."{ID})*

%x TAG

%%

<TAG>{NUMBER}           { return "NUMBER"; }
<TAG>\"(\\\"|[^"])*\"   { return "STRING"; } /* error */
<TAG>{DOTTED_ID}        { return "ID"; }
<TAG>"@"{DOTTED_ID}     { return "PARAM"; }

If I remove the <TAG> or trailing \" in the pattern, syntax highlighting works correctly.

Yash Version: 0.2.0
VS Code Version: 1.44.2 (user setup)
Commit: ff915844119ce9485abfe8aa9076ec76b5300ddd
Date: 2020-04-16T16:36:23.138Z (1 wk ago)
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.18362

@babyraging
Copy link
Owner

Hi rveerd, thank you for the issue.

Indeed this is wrong, I can reproduce it, thanks again for finding it.

Maybe tonight or tomorrow I'll have the issue fixed.

@babyraging babyraging added the bug Something isn't working label Apr 28, 2020
@babyraging
Copy link
Owner

The issue should be fixed with 0.2.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants