kach / nearley

📜🔜🌲 Simple, fast, powerful parser toolkit for JavaScript.
https://nearley.js.org
MIT License
3.57k stars 231 forks source link

Rename identifiers #588

Open panayotisk opened 2 years ago

panayotisk commented 2 years ago

Is there a way I could use nearley.js to rename variables in code that can be parsed by nearley? I suppose I could parse the generated AST and modify the relevant parts, but then can I somehow convert it back into code?

conartist6 commented 2 years ago

That would be called printing. It is something you want to build, but it is not nearley's concern.