Skip to content

Separate out "trivia" from "notation" #564

Open
@Keno

Description

@Keno

The usual definition of "trivia" are "things that can be removed from the input without affecting the semantics of the output of the parse" and includes whitespace, comments (and depending on who you ask, docstrings). However, when JuliaSyntax talks about "trivia" this includes everything that does not end up in the final AST and includes fixed keywords, notation, etc. We should separate these categories so that downstream users can make use of this information. In some circumstances, it might make sense to print code without trivia (e.g. when space constrained), or to change the highlighting of trivial, but keeping notation intact.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions