esprima-python
esprima-python copied to clipboard
fix toDict issue of Literal null
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.