mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 09:41:05 +01:00
Handle parsing of require...impls declarations (#6255)
Check is not implemented yet, but some tests are added.
This commit is contained in:
@@ -130,6 +130,8 @@ static constexpr auto DeclIntroducers = [] {
|
||||
StateKind::TypeAfterIntroducerAsInterface);
|
||||
set(Lex::TokenKind::Namespace, NodeKind::NamespaceStart,
|
||||
StateKind::Namespace);
|
||||
set(Lex::TokenKind::Require, NodeKind::RequireIntroducer,
|
||||
StateKind::RequireAfterIntroducer);
|
||||
set_contextual(Lex::TokenKind::Let, RegularContext, NodeKind::LetIntroducer,
|
||||
StateKind::Let);
|
||||
set_contextual(Lex::TokenKind::Let, ClassContext, NodeKind::LetIntroducer,
|
||||
@@ -225,6 +227,7 @@ static auto ResolveAmbiguousTokenAsDeclaration(Context& context,
|
||||
case Lex::TokenKind::Let:
|
||||
case Lex::TokenKind::Library:
|
||||
case Lex::TokenKind::Namespace:
|
||||
case Lex::TokenKind::Require:
|
||||
case Lex::TokenKind::Var:
|
||||
#define CARBON_PARSE_NODE_KIND(Name)
|
||||
#define CARBON_PARSE_NODE_KIND_TOKEN_MODIFIER(Name) case Lex::TokenKind::Name:
|
||||
|
||||
Reference in New Issue
Block a user