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

Lexer error when processing strings with last slash #193

Closed
jcubic opened this issue Nov 3, 2021 · 1 comment
Closed

Lexer error when processing strings with last slash #193

jcubic opened this issue Nov 3, 2021 · 1 comment
Labels
bug Something isn't working resolved

Comments

@jcubic
Copy link
Collaborator

jcubic commented Nov 3, 2021

This string gives issues:

"\\"

because the lexer have very simple rule for strings:

    [/"/, /^$|[^\\]/, null, null, Lexer.string],
    [/"/, /^$|[^\\]/, null, Lexer.string, null],
@jcubic jcubic added the bug Something isn't working label Nov 3, 2021
@jcubic
Copy link
Collaborator Author

jcubic commented Feb 10, 2022

This may be fixed by introducing two states for strings. One normal string and one for escape characters.

Lexer.string_escape

jcubic added a commit that referenced this issue Feb 11, 2022
jcubic added a commit that referenced this issue Feb 11, 2022
@jcubic jcubic closed this as completed Dec 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resolved
Projects
None yet
Development

No branches or pull requests

1 participant