carbon-language / carbon-lang

Carbon Language's main repository: documents, design, implementation, and related tools. (NOTE: Carbon Language is experimental; see README)
https://github.com/carbon-language/carbon-lang/blob/trunk/README.md
Other
32.31k stars 1.48k forks source link

Add namespace-scoped private keyword support. #4026

Closed jonmeow closed 3 weeks ago

jonmeow commented 4 weeks ago

Adds access to the name lookup table in name scopes. This is so that we can quickly check access during name lookup without resolving the entity itself. Does this for names in general, but does not implement handling for entity-scoped names, only namespace-scoped names (where they're essentially just not exported).

Excludes private names from exports. Although names should be accessible to impl files, that's not implemented here because we'll probably want to do it by directly copying name lookup tables.

jonmeow commented 4 weeks ago

I think Richard convinced me to try a different approach.