Closed halloleo closed 1 year ago
You can use a NPM library called escodegen. You can use my Js2Py library to use it from python, example is here:
It will be a bit slow though as this is auto-translated JS code to Python.
Thanks for the pointer, @PiotrDabkowski.
Will certainly checkout escodegen and I might sue it via your Js2Py.
I want to use pyjsparser to write an identifier renamer. For this I generate an AST from the JScode, modify the AST and then convert it back to JavaScript. I know how to generate the AST with pyjsparser. Can I then somehow generate JavaScript from the AST?