Skip to content

transform: accept AST input #10992

@lukeed

Description

@lukeed

Ideally I should be able to run code thru oxc-parser, apply my own visitors, and then pass the resulting AST to oxc-transform to write/convert to string.

Plugging into the existing oxc-transform output options is fine to start, but I think oxc-transform should also allow TS/TSX final output. This wouldn’t be the default/common case, but it’d allow for a wider range of transformations without the need for an oxc-writer standalone module that (hypothetically) would just stringify an AST. (This would be kinda silly since that functionality would already be included in oxc-transform, which would mean projects using oxc-parser, oxc-transformer, and oxc-writer include the parsing and writing Rust code twice)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions