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:
Jon Ross-Perkins
2023-12-04 21:05:41 +00:00
committed by GitHub
parent 1c4a35c76b
commit 30155dbb72
262 changed files with 721 additions and 129 deletions
+3
View File
@@ -638,6 +638,9 @@ CARBON_PARSE_NODE_KIND_CHILD_COUNT(SelfValueNameExpr, 0,
CARBON_PARSE_NODE_KIND_CHILD_COUNT(SelfTypeNameExpr, 0,
CARBON_TOKEN(SelfTypeIdentifier))
// The `package` keyword in an expression.
CARBON_PARSE_NODE_KIND_CHILD_COUNT(PackageExpr, 0, CARBON_TOKEN(Package))
#undef CARBON_PARSE_NODE_KIND
#undef CARBON_PARSE_NODE_KIND_BRACKET
#undef CARBON_PARSE_NODE_KIND_CHILD_COUNT