mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-15 03:08:33 +00:00
Fix a case of InvalidParse with has_error = false (#4481)
Introduced in #4470. Co-authored-by: Josh L <josh11b@users.noreply.github.com>
This commit is contained in:
1 parent
fcd611406a
commit
607522c7de
2 files changed
+3
-2
No files matched your search
@@ -336,7 +336,8 @@ auto Context::ConsumeListToken(NodeKind comma_kind, Lex::TokenKind close_kind,
|
||||
if (PositionIs(close_kind)) {
|
||||
return ListTokenKind::Close;
|
||||
} else {
|
||||
AddLeafNode(comma_kind, Consume());
|
||||
AddLeafNode(comma_kind, Consume(),
|
||||
/*has_error=*/comma_kind == NodeKind::InvalidParse);
|
||||
return PositionIs(close_kind) ? ListTokenKind::CommaClose
|
||||
: ListTokenKind::Comma;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user