Feasibility of Using Cake's Parser/AST Standalone #188
Replies: 2 comments 1 reply
-
Transformations can be done directly in cake creating a "visit" It also possible to create a visit that generates the AST in some format, like json, or xml then consume Cake needs a language server, is that you mean by LSP? |
Beta Was this translation helpful? Give feedback.
-
Thanks for the pointers! I'll focus on "format_visit.c" to start.
Are you referring to the
I did mean language server, but I should have clarified - the intention is to try and use Cake's C23 parser/AST to do simple code transformations on a codebase like refactor every usage of a function in a project. |
Beta Was this translation helpful? Give feedback.
-
@thradams, I'm curious what your opinion is w.r.t Cake's parser and AST representation being used in a standalone manner. I don't have enough familiarly with the structure of the source to make a good determination myself, but have been looking at other parsers/ASTs like the one in Clang or pycparser.
The end goal wouldn't be to do transpilation like Cake, but some some simple code analysis and transformations akin to what you would expect an LSP server to do.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions