mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Use abbreviation "decl" instead of "declaration" (#3382)
Part of switching to the [abbreviations we've decided to use](https://docs.google.com/document/d/1RRYMm42osyqhI2LyjrjockYCutQ5dOf8Abu50kTrkX0/edit?resourcekey=0-kHyqOESbOHmzZphUbtLrTw#heading=h.pph7i5m5un7q). I will rename files in a follow-up PR.
This commit is contained in:
@@ -14,15 +14,15 @@ auto HandleNamespace(Context& context) -> void {
|
||||
state.state = State::NamespaceFinish;
|
||||
context.PushState(state);
|
||||
|
||||
context.PushState(State::DeclarationNameAndParamsAsNone, state.token);
|
||||
context.PushState(State::DeclNameAndParamsAsNone, state.token);
|
||||
}
|
||||
|
||||
auto HandleNamespaceFinish(Context& context) -> void {
|
||||
auto state = context.PopState();
|
||||
|
||||
if (state.has_error) {
|
||||
context.RecoverFromDeclarationError(state, NodeKind::Namespace,
|
||||
/*skip_past_likely_end=*/true);
|
||||
context.RecoverFromDeclError(state, NodeKind::Namespace,
|
||||
/*skip_past_likely_end=*/true);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -30,9 +30,9 @@ auto HandleNamespaceFinish(Context& context) -> void {
|
||||
context.AddNode(NodeKind::Namespace, *semi, state.subtree_start,
|
||||
state.has_error);
|
||||
} else {
|
||||
context.EmitExpectedDeclarationSemi(Lex::TokenKind::Namespace);
|
||||
context.RecoverFromDeclarationError(state, NodeKind::Namespace,
|
||||
/*skip_past_likely_end=*/true);
|
||||
context.EmitExpectedDeclSemi(Lex::TokenKind::Namespace);
|
||||
context.RecoverFromDeclError(state, NodeKind::Namespace,
|
||||
/*skip_past_likely_end=*/true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user