ww: add file-scoped import aliases

This commit is contained in:
2026-08-14 10:56:34 +09:00
parent 351f4a25bc
commit 792b6ecbe5
14 changed files with 587 additions and 430 deletions

View File

@@ -343,11 +343,12 @@ struct Node {
* let) carry it. On an N_USE node
* this is the importing (owning)
* module. */
const char *usepath; /* M1 #22: on an N_USE node, the full
* canonical import path (`encoding.utf8`);
* `str` is the declared default qualifier. Drives
* the path-keyed decl_mod match and the
* qualified-ref codegen hint. */
const char *usesource; /* N_USE: immutable dotted source spelling. */
const char *usepath; /* N_USE: canonical, vendor-expanded identity;
* initially equal to `usesource`. */
const char *usealias; /* N_USE: explicit file-local alias, or NULL. */
const char *usepkgname; /* N_USE: imported declared package name,
* independent of the visible binding in `str`. */
const char *pkgname; /* declared package name for this source/export
* section; independent of canonical `module`. */
int sourceid; /* lexical source-file scope within the parsed