Skip to content

Compiler output should include reference to the original markup #530

Open
@mathisonian

Description

@mathisonian

Is your feature request related to a problem? Please describe.
The AST is a useful representation of idyll markup, however it is difficult to map this back onto substrings in the original markup. Each AST node should include a reference to the original string that generated it.

Describe the solution you'd like
The AST should be updated to include an additional field, raw which includes the original markup that maps onto the node. The compiler should be updated to populate this field.

Describe alternatives you've considered
Something similar can be achieved using the ASTToMarkup function in idyll-ast, however this transformation loses the original formatting and doesn't have a detailed mapping between AST nodes and substrings in the markup.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions