mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Basic support for associated constant declarations (#3737)
This commit is contained in:
@@ -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