mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-03 11:45:56 +01:00
Extend description of parser states to show which tokens they consume. (#3378)
Also some minor improvements and typo fixes to the parser code for issues found while writing these descriptions.
This commit is contained in:
@@ -24,10 +24,10 @@ auto HandleFunctionAfterParameters(Context& context) -> void {
|
||||
context.PushState(state);
|
||||
|
||||
// If there is a return type, parse the expression before adding the return
|
||||
// type nod.e
|
||||
// type node.
|
||||
if (context.PositionIs(Lex::TokenKind::MinusGreater)) {
|
||||
context.PushState(State::FunctionReturnTypeFinish);
|
||||
++context.position();
|
||||
context.ConsumeAndDiscard();
|
||||
context.PushStateForExpr(PrecedenceGroup::ForType());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user