You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we add one or more spaces at the starting of the expression string, the code is breaking. This is syntactically valid. No idea why is it failing.
from baron import parse, dumps
source_code=' 1+2 '
parse(source_code)
Pars ingError: Error, got an unexpected token SPACE here:
1 <---- here
The token SPACE should be one of those: ASSERT, AT, BACKQUOTE, BINARY, BINARY_RAW_STRING, BINARY_STRING, BREAK, CLASS, COMMENT, COMPLEX, CONTINUE, DEF, DEL, ELLIPSIS, ENDL, ENDMARKER, FLOAT, FLOAT_EXPONANT, FLOAT_EXPONANT_COMPLEX, FOR, FROM, GLOBAL, HEXA, IF, IMPORT, INT, INTERPOLATED_RAW_STRING, INTERPOLATED_STRING, LAMBDA, LEFT_BRACKET, LEFT_PARENTHESIS, LEFT_SQUARE_BRACKET, LONG, MINUS, NAME, NONLOCAL, NOT, OCTA, PASS, PLUS, RAISE, RAW_STRING, RETURN, STAR, STRING, TILDE, TRY, UNICODE_RAW_STRING, UNICODE_STRING, WHILE, WITH, YIELD
Baron has failed to parse this input. If this is valid python code (and by that I mean that the python binary successfully parse this code without any syntax error) (also consider that python does not yet parse python 3 code integrally) it would be kind if you can extract a snippet of your code that make Baron fails and open a bug here: https://github.com/PyCQA/baron/issues
Sorry for the inconvenience.
The text was updated successfully, but these errors were encountered:
sreeanthrds
changed the title
leading space to the expression breaking
leading space to the expression is breaking
Apr 8, 2021
When we add one or more spaces at the starting of the expression string, the code is breaking. This is syntactically valid. No idea why is it failing.
The text was updated successfully, but these errors were encountered: