mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-16 01:08:20 +00:00
Handle malformed subscript expressions (#3064)
Closes #3063 --------- Co-authored-by: Richard Smith <richard@metafoo.co.uk>
This commit is contained in:
1 parent
7feaed312a
commit
049fbc1ee4
7 files changed
+56
-23
No files matched your search
@@ -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