mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-25 14:21:12 +00:00
Change return of SkipPastLikelyEnd to be last consumed token (#3493)
This approach means the parse subtree includes the full token range consumed. --------- Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
This commit is contained in:
1 parent
1addf10054
commit
6067ca3f49
28 files changed
+72
-94
No files matched your search
@@ -48,9 +48,7 @@ auto HandleLetFinish(Context& context) -> void {
|
||||
} else {
|
||||
context.EmitExpectedDeclSemi(Lex::TokenKind::Let);
|
||||
state.has_error = true;
|
||||
if (auto semi_token = context.SkipPastLikelyEnd(state.token)) {
|
||||
end_token = *semi_token;
|
||||
}
|
||||
end_token = context.SkipPastLikelyEnd(state.token);
|
||||
}
|
||||
context.AddNode(NodeKind::LetDecl, end_token, state.subtree_start,
|
||||
state.has_error);
|
||||
|
||||
Reference in new issue
Block a user