mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-20 12:56:43 +00:00
Parser for index expression such as a[0] (#3033)
Co-authored-by: Farzana Ahmed Siddique <fasiddique@google.com>
This commit is contained in:
1 parent
9e03d5efe2
commit
6cca85534f
7 files changed
+121
No files matched your search
@@ -137,6 +137,12 @@ auto ParserHandleExpressionInPostfixLoop(ParserContext& context) -> void {
|
||||
context.PushState(state);
|
||||
break;
|
||||
}
|
||||
case TokenKind::OpenSquareBracket: {
|
||||
context.PushState(state);
|
||||
state.state = ParserState::IndexExpression;
|
||||
context.PushState(state);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
if (state.has_error) {
|
||||
context.ReturnErrorOnState();
|
||||
|
||||
Reference in new issue
Block a user