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.

Remove 'prefix' field in favor of Token-level whitespace/comments? #26

@LPGhatguy

Description

@LPGhatguy

Having to have an EndOfFile token is awkward. It might make more sense if the parser rules are a little smarter and comments and whitespace appeared in stream, next to tokens.

Tokens would have another layer added to them, something like:

enum Token<'a> {
    Semantic(ActualToken<'a>),
    Whitespace(Cow<'a, str>),
    Comment(Comment<'a>),
}

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