mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-25 23:21:11 +00:00
Improve parsing of invalid expressions. (#2726)
This addresses crashes for infix operator expressions, but the approach should more generally yield balanced parsed trees.
This commit is contained in:
1 parent
7824e9618c
commit
a905cdea30
8 files changed
+74
-13
No files matched your search
+3
-2
@@ -11,8 +11,9 @@
|
||||
// CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2},
|
||||
// CHECK:STDOUT: {kind: 'FunctionDefinitionStart', text: '{', subtree_size: 5},
|
||||
// CHECK:STDOUT: {kind: 'ReturnStatementStart', text: 'return'},
|
||||
// CHECK:STDOUT: {kind: 'ReturnStatement', text: 'return', has_error: yes, subtree_size: 2},
|
||||
// CHECK:STDOUT: {kind: 'FunctionDefinition', text: '}', subtree_size: 8},
|
||||
// CHECK:STDOUT: {kind: 'InvalidExpression', text: '}', has_error: yes},
|
||||
// CHECK:STDOUT: {kind: 'ReturnStatement', text: 'return', has_error: yes, subtree_size: 3},
|
||||
// CHECK:STDOUT: {kind: 'FunctionDefinition', text: '}', subtree_size: 9},
|
||||
// CHECK:STDOUT: {kind: 'FileEnd', text: ''},
|
||||
// CHECK:STDOUT: ]
|
||||
|
||||
|
||||
Reference in new issue
Block a user