Prompting LLMs to Modify Existing Code using Abstract Syntax Tree (AST) parsing

Getting LLMs to more reliably modify code- let's parse Abstract Syntax Trees and have the LLM operate on that rather than the raw code- will it work? I wrote a blog post, "Prompting LLMs to Modify Existing Code using ASTs"

Prompting LLMs to Modify Existing Code using ASTs - getting GPT-4o to make changes to your HTML by having it write python (beautiful) and then execute the python to get your HTML