mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 10:21:04 +01: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:
@@ -43,6 +43,9 @@
|
||||
// The end of the file.
|
||||
CARBON_PARSE_NODE_KIND_CHILD_COUNT(FileEnd, 0)
|
||||
|
||||
// An invalid expression. Used to balance the parse tree. Always has an error.
|
||||
CARBON_PARSE_NODE_KIND_CHILD_COUNT(InvalidExpression, 0)
|
||||
|
||||
// An empty declaration, such as `;`.
|
||||
CARBON_PARSE_NODE_KIND_CHILD_COUNT(EmptyDeclaration, 0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user