mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-16 22:58:12 +00:00
Require that InvalidParse nodes must have an error (#4482)
Unifies some boilerplate AddLeafNode calls for InvalidParse, and checks has_error in AddNode.
This commit is contained in:
1 parent
26e58b4587
commit
2841e9a67e
10 files changed
+31
-34
No files matched your search
@@ -38,8 +38,7 @@ auto HandleImplAfterIntroducer(Context& context) -> void {
|
||||
// If we aren't producing a node from the PatternListAsImplicit state,
|
||||
// we still need to create a node to be the child of the `ImplForall`
|
||||
// token created in the `ImplAfterForall` state.
|
||||
context.AddLeafNode(NodeKind::InvalidParse, *context.position(),
|
||||
/*has_error=*/true);
|
||||
context.AddInvalidParse(*context.position());
|
||||
}
|
||||
} else {
|
||||
// One of:
|
||||
|
||||
Reference in new issue
Block a user