feat(pbs): support quoted project imports and installed authoring contracts

This commit is contained in:
2026-11-10 15:19:53 +00:00
parent ea1cc26fe3
commit b351f2e582
159 changed files with 11368 additions and 50 deletions
@@ -234,10 +234,27 @@ Imports target modules, never files.
ImportDecl ::= 'import' ( ModuleRef | '{' ImportList '}' 'from' ModuleRef ) ';'
ImportList ::= ImportItem (',' ImportItem)*
ImportItem ::= Identifier ('as' Identifier)?
ModuleRef ::= '@' Identifier ':' ModulePath
ModuleRef ::= '@' ProjectName ':' ModulePath
ProjectName ::= Identifier | StringLiteral
ModulePath ::= Identifier ('/' Identifier)*
```
`StringLiteral` here is the ordinary double-quoted string from section 4, with
only the existing `\\`, `\"`, `\n`, `\r` and `\t` escapes. Text blocks and
expressions are not project names. The decoded value must be nonblank and
identifies the exact manifest project name; delimiters do not become identity.
```pbs
import { Inventory } from @"zelda-1":inventory;
import { Collision } from @"physics-2d":collision;
```
This alternative applies to both module and named imports. Existing identifier
imports remain valid. Quoting is limited to the project segment: module paths
retain identifier segments. Unquoted `@zelda-1:inventory` is malformed; use
`@"zelda-1":inventory`. Quoting does not create a universal current-project alias.
See specification 5 for exact identity and reserved-space resolution.
### 6.1.1 Attributes
Attributes are bracketed compile-time metadata forms.