Skip to content
This repository was archived by the owner on Jan 24, 2020. It is now read-only.
This repository was archived by the owner on Jan 24, 2020. It is now read-only.

Style preservation in AST #19

@LPGhatguy

Description

@LPGhatguy

We probably want to hold off on jamming style information into the AST until we have complete grammar coverage.

How can this be done in a way that isn't too cumbersome?

A sample block, with all the places we care about whitespace being marked:

<HERE>if <expression><HERE>then
    <chunk>
<HERE>elseif <expression><HERE> then
    <chunk>
<HERE>else
    <chunk>
<HERE>end

Since we always consume whitespace before a token, any whitespace before <expression> or <chunk> belongs to those AST nodes instead, which simplifies things a bit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions