lips icon indicating copy to clipboard operation
lips copied to clipboard

Lexer error when processing strings with last slash

Open jcubic opened this issue 3 years ago • 1 comments

This string gives issues:

"\\"

because the lexer have very simple rule for strings:

    [/"/, /^$|[^\\]/, null, null, Lexer.string],
    [/"/, /^$|[^\\]/, null, Lexer.string, null],

jcubic avatar Nov 03 '21 15:11 jcubic

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

Lexer.string_escape

jcubic avatar Feb 10 '22 23:02 jcubic