-
-
Couldn't load subscription status.
- Fork 43
Closed
Description
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.