Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix toDict issue of Literal null #22

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

NITROGENousFish
Copy link

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.

@sufiyangorgias
Copy link

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.

@Kronuz By any chance you are considering this fix to be merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants