Groups
Groups
Sign in
Groups
Groups
esprima
Conversations
About
Send feedback
Help
Dump JS source code after modify values in Syntax Tree Format
128 views
Skip to first unread message
Jus LL
unread,
Apr 27, 2013, 2:33:07 AM
4/27/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to esp...@googlegroups.com
Hi all
I parsed some Javascript code using
esprima.parse(someCode);
After modify some values of some statement in the JSON it returns, I want to covert the JSON back to Javascript source code. Any ideas?
Thanks
Jus LL
unread,
Apr 27, 2013, 3:24:12 AM
4/27/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to esp...@googlegroups.com
In other words, given the JSON of syntax tree format code, how to convert this back to actual javascript source code?
Thanks
Ariya Hidayat
unread,
Apr 27, 2013, 9:48:54 AM
4/27/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to esp...@googlegroups.com
Check the demo
http://esprima.org/demo/rewrite.html
.
You can use escodegen:
https://github.com/Constellation/escodegen
.
Regards,
--
Ariya Hidayat,
http://ariya.ofilabs.com
http://twitter.com/ariyahidayat
http://gplus.to/ariyahidayat
Reply all
Reply to author
Forward
0 new messages