esprima-python icon indicating copy to clipboard operation
esprima-python copied to clipboard

fix toDict issue of Literal null

Open NITROGENousFish opened this issue 2 years ago • 1 comments

I'm trying to store the AST to json using toDict() and re-translate it back to javascript with a npm package called escodegen . In the process I found an inconsistency between the parsing result of "null" and the esprima website (ssing 'value') , which causes the translation of AST back to javascript failed. I simply enhansed visitor.py

Also del OCTAL_CONV, HEX_CONV in character.py will cause an import issue when esprima-python is import relativly (not by pip install). I don't understand the meaning of removing these two global variables.

NITROGENousFish avatar May 28 '22 09:05 NITROGENousFish