mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Change tuple/paren expr parsing to use placeholders. (#3849)
I've been thinking about this since we decided to add placeholders in the parse tree. This allows a clearer division of work in check handling, where we were doing work for ExprOpenParen that's only necessary for tuples (splitting/renaming handle_paren.cpp accordingly).
This commit is contained in:
+2
-2
@@ -30,7 +30,7 @@ fn C() -> const (i32*) { return C(); }
|
||||
// CHECK:STDOUT: {kind: 'IdentifierName', text: 'B'},
|
||||
// CHECK:STDOUT: {kind: 'TuplePatternStart', text: '('},
|
||||
// CHECK:STDOUT: {kind: 'TuplePattern', text: ')', subtree_size: 2},
|
||||
// CHECK:STDOUT: {kind: 'ExprOpenParen', text: '('},
|
||||
// CHECK:STDOUT: {kind: 'ParenExprStart', text: '('},
|
||||
// CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'},
|
||||
// CHECK:STDOUT: {kind: 'PrefixOperatorConst', text: 'const', subtree_size: 2},
|
||||
// CHECK:STDOUT: {kind: 'ParenExpr', text: ')', subtree_size: 4},
|
||||
@@ -47,7 +47,7 @@ fn C() -> const (i32*) { return C(); }
|
||||
// CHECK:STDOUT: {kind: 'IdentifierName', text: 'C'},
|
||||
// CHECK:STDOUT: {kind: 'TuplePatternStart', text: '('},
|
||||
// CHECK:STDOUT: {kind: 'TuplePattern', text: ')', subtree_size: 2},
|
||||
// CHECK:STDOUT: {kind: 'ExprOpenParen', text: '('},
|
||||
// CHECK:STDOUT: {kind: 'ParenExprStart', text: '('},
|
||||
// CHECK:STDOUT: {kind: 'IntTypeLiteral', text: 'i32'},
|
||||
// CHECK:STDOUT: {kind: 'PostfixOperatorStar', text: '*', subtree_size: 2},
|
||||
// CHECK:STDOUT: {kind: 'ParenExpr', text: ')', subtree_size: 4},
|
||||
|
||||
Reference in New Issue
Block a user