mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Decouple associated constants from let (#5973)
Decouples associated constants from being special cased in let handlers. Enforces associated constant grammar restrictions in parsing instead of checking. Closes #5411
This commit is contained in:
@@ -24,8 +24,10 @@ static auto HandleDeclOrDefinition(Context& context, NodeKind decl_kind,
|
||||
context.PushState(state, definition_finish_state);
|
||||
if (decl_kind == NodeKind::ClassDecl) {
|
||||
context.PushState(StateKind::DeclScopeLoopAsClass);
|
||||
} else if (decl_kind == NodeKind::InterfaceDecl) {
|
||||
context.PushState(StateKind::DeclScopeLoopAsInterface);
|
||||
} else {
|
||||
context.PushState(StateKind::DeclScopeLoopAsNonClass);
|
||||
context.PushState(StateKind::DeclScopeLoopAsRegular);
|
||||
}
|
||||
context.AddNode(definition_start_kind, context.Consume(), state.has_error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user