Skip to content

Decide whether K"parens" should be visible to SyntaxNode #239

@c42f

Description

@c42f

As of #222 etc we have a parse node for grouping parentheses. This is extremely useful for tooling and has allowed several parsing difficulties to be solved neatly.

But it's pretty inconvenient when using SyntaxNode in a way that few other tree nodes are - parentheses are permitted in many unusual situations in the reference parser, and often treated as completely invisible to the parser.

Also SyntaxNode is AST-like, but grouping parens are arguably syntax trivia and shouldn't be in the AST anyway.

So maybe we should include parens only in the green tree, but elide them when converting to SyntaxNode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions