Modifying the parsed Javascript AST #5022
Unanswered
MichaelTheSynthCat
asked this question in
Q&A
Replies: 1 comment
-
I suggest to look how lint rules create code actions (check the For applying the mutation and generating the new CST, here's an example: biome/crates/biome_service/src/file_handlers/javascript.rs Lines 725 to 739 in be56c2e |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is it possible to make changes to AST built from parsed Javascript?
Let's say that I parse a script with
biome_js_parser
that contains this statement:How can I find this node and replace the
"hello" + "world"
with a single string literal"hello world"
?Beta Was this translation helpful? Give feedback.
All reactions