mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-03 22:02:51 +01:00
Add support for 'package' in expressions. (#3445)
This creates a namespace for `package` scope. It looks like names of class_decls in namespaces lead to an unexpected instref. This is already true, as best as I can tell. I'm not sure if there's a preferred approach to address that, so I've left a TODO for now.
This commit is contained in:
@@ -147,6 +147,11 @@ auto HandleExprInPostfix(Context& context) -> void {
|
||||
context.PushState(State::ArrayExpr);
|
||||
break;
|
||||
}
|
||||
case Lex::TokenKind::Package: {
|
||||
context.AddLeafNode(NodeKind::PackageExpr, context.Consume());
|
||||
context.PushState(state);
|
||||
break;
|
||||
}
|
||||
case Lex::TokenKind::SelfValueIdentifier: {
|
||||
context.AddLeafNode(NodeKind::SelfValueNameExpr, context.Consume());
|
||||
context.PushState(state);
|
||||
|
||||
Reference in New Issue
Block a user