mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-03 22:02:51 +01:00
These don't fully work in check and beyond yet, because they're not added into lexical lookup, but already mostly do the right thing. Per #3407, disallow namespace declarations anywhere other than at file scope for now. We don't treat statements starting with a packaging introducer keyword (`package`, `library`, `import`) as declarations because they're sufficiently unlikely to occur that the error recovery doesn't seem important, and this avoids needing to disambiguate `package.` at the start of an expression.