PiotrDabkowski / pyjsparser

Fast JavaScript parser for Python.
MIT License
246 stars 37 forks source link

improper parsing of truth values #6

Closed mounty1 closed 7 years ago

mounty1 commented 8 years ago

pyjsparser.py line 262 has "elif (i == 'true' or d == 'false'):". The LHS of the first comparison should be d, not i, which isn't defined in the current scope.

Even with that fixed, the output AST encodes the truth values as Literals. To output identifiers, I simply commented-out ll 262--263.

PiotrDabkowski commented 7 years ago

Wow that was a tricky one, thanks. Fixed