slimit icon indicating copy to clipboard operation
slimit copied to clipboard

Wrong tree on parsing array/string with special characters (EOL)

Open wizche opened this issue 9 years ago • 0 comments

If parsing the following javascript:

var x = ['a','\n'];

The resulting Array node will contain only the 'a' field. image

Probably also related, when parsing var x = '\n'; the following exception is raised:

SyntaxError: Unexpected token (SEMI, ';') at 1:11 between LexToken(LINE_TERMINATOR,'\n',1,9) and None
-------------------- >> begin captured stdout << ---------------------
Illegal character "'" at 1:8 after LexToken(EQ,'=',1,6)
Illegal character "'" at 1:10 after LexToken(LINE_TERMINATOR,'\n',1,9)

wizche avatar Jan 18 '16 13:01 wizche