mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-16 22:08:11 +00:00
Parse where assignment declarations in impl definitions (#8136)
These were introduced in proposal #5168. Details: https://github.com/carbon-language/carbon-lang/blob/b7ea32c3a49620fae12f0b2298c81d429a20eab3/proposals/p005168-forward-impl-declaration-of-an-incomplete-interface.md#associated-constants-may-be-assigned-in-the-body-of-an-impl-definition
This commit is contained in:
1 parent
71a125a4c1
commit
c0b2cc5921
14 files changed
+529
-22
No files matched your search
@@ -150,6 +150,8 @@ static constexpr auto DeclIntroducers = [] {
|
||||
NodeKind::VariableIntroducer, StateKind::VarAsRegular);
|
||||
set_contextual(Lex::TokenKind::Var, ClassContext,
|
||||
NodeKind::VariableIntroducer, StateKind::VarAsRegular);
|
||||
set(Lex::TokenKind::Where, NodeKind::WhereAssignmentIntroducer,
|
||||
StateKind::WhereAssignment);
|
||||
|
||||
set(Lex::TokenKind::Inline, NodeKind::InlineIntroducer,
|
||||
StateKind::InlineDeclAfterIntroducer);
|
||||
@@ -240,6 +242,7 @@ static auto ResolveAmbiguousTokenAsDeclaration(Context& context,
|
||||
case Lex::TokenKind::Namespace:
|
||||
case Lex::TokenKind::Require:
|
||||
case Lex::TokenKind::Var:
|
||||
case Lex::TokenKind::Where:
|
||||
#define CARBON_PARSE_NODE_KIND(Name)
|
||||
#define CARBON_PARSE_NODE_KIND_TOKEN_MODIFIER(Name) case Lex::TokenKind::Name:
|
||||
#include "toolchain/parse/node_kind.def"
|
||||
|
||||
Reference in new issue
Block a user