mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-29 12:04:56 +01:00
Handle malformed subscript expressions (#3064)
Closes #3063 --------- Co-authored-by: Richard Smith <richard@metafoo.co.uk>
This commit is contained in:
co-authored by
Richard Smith
parent
7feaed312a
commit
049fbc1ee4
@@ -118,7 +118,9 @@ auto ParserHandleStatementForHeaderIn(ParserContext& context) -> void {
|
||||
auto ParserHandleStatementForHeaderFinish(ParserContext& context) -> void {
|
||||
auto state = context.PopState();
|
||||
|
||||
context.ConsumeAndAddCloseParen(state, ParseNodeKind::ForHeader);
|
||||
context.ConsumeAndAddCloseSymbol(
|
||||
*(TokenizedBuffer::TokenIterator(state.token) + 1), state,
|
||||
ParseNodeKind::ForHeader);
|
||||
|
||||
context.PushState(ParserState::CodeBlock);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user