Skip to content

Source code generation from the AST #43

@vinaysshenoy

Description

@vinaysshenoy

I've been working on a meta-programming tool that can process generated code for the Android Room database and transform it to insert profiling statements. Since this generates Java code, I've used JavaParser to read the Java code into an AST, transform it and output the transformed AST as source code (since this is a feature that JavaParser supports) to be used in the final build.

I also want to add support for SQLDelight. However, that generates Kotlin code, so I need a tool that can not only parse the generated Kotlin code, but lets me modify it and output transformed source code.

As far as I can tell, kotlinx.ast only supports reading the source code and not generating code from the AST. Would I be correct in that?

Metadata

Metadata

Assignees

No one assigned

    Labels

    feedbackwaiting for feedbackquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions