mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-26 00:11:11 +00:00
Basic support for associated constant declarations (#3737)
This commit is contained in:
1 parent
fea2651e7c
commit
8e956baca8
26 files changed
+778
-82
No files matched your search
@@ -30,14 +30,6 @@ auto HandleLetAfterPattern(Context& context) -> void {
|
||||
if (auto equals = context.ConsumeIf(Lex::TokenKind::Equal)) {
|
||||
context.AddLeafNode(NodeKind::LetInitializer, *equals);
|
||||
context.PushState(State::Expr);
|
||||
} else {
|
||||
if (!state.has_error) {
|
||||
CARBON_DIAGNOSTIC(
|
||||
ExpectedInitializerAfterLet, Error,
|
||||
"Expected `=`; `let` declaration must have an initializer.");
|
||||
context.emitter().Emit(*context.position(), ExpectedInitializerAfterLet);
|
||||
}
|
||||
context.ReturnErrorOnState();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user