Surface rename of the signed integer family: s1..s64 become i1..i64
(u1..u64, usize, isize unchanged). 'string' keeps the s-prefix arm in
name classification; width parsing moves to the i-prefix arm next to
isize.
Internal TypeId tags follow the surface (.s8/.s16/.s32/.s64 ->
.i8/.i16/.i32/.i64), as do mono-key mangle fragments (ptr_i64,
tu_i64_bool) and all display/diagnostic formatting (i{d}).
Migrated in the same sweep: stdlib + examples + issue repros + FFI C
companions (shared symbol names like ffi_id_i64), expected
stdout/stderr/ir snapshots, specs.md, readme.md, CLAUDE.md/AGENTS.md,
implementation_plan.md, docs/, issue writeups. Vendored stb_image and
historical flow state left untouched.
zig build test: 426/426; examples suite: 595/595.
25 lines
1.1 KiB
Plaintext
25 lines
1.1 KiB
Plaintext
// Feature 1 / Step 1.2 — pack-expansion forms PARSE in all four positions.
|
|
//
|
|
// Parse-only probe. Spread reuses the existing `spread_expr` node (its operand
|
|
// carries projection `xs.field` / type-application `F(Ts)`); closure-sig packs
|
|
// use `ClosureTypeExpr.pack_name` + the new `pack_projection`. Sema/lowering
|
|
// arrive in Phase 2 — do NOT expect this to compile/run yet. The authoritative
|
|
// checks are the parser unit tests in src/parser.zig ("parse pack expansion: …").
|
|
|
|
// 1. Tuple value position — `(..pack)` / `(..pack.field)`:
|
|
tv1 :: () => (..xs);
|
|
tv2 :: () => (..xs.value);
|
|
tv3 :: () => (a, ..xs, b); // mixed positional + spread
|
|
|
|
// 2. Tuple type position — `(..F(Ts))` / `(..F(Ts.Arg))`:
|
|
tt1 :: (x: (..ValueListenable(Ts))) => x;
|
|
tt2 :: (x: (..ValueListenable(Ts.Arg))) => x;
|
|
|
|
// 3. Call-arg position — `..pack` / `..pack.field` (reuses spread_expr):
|
|
ca1 :: () => f(..xs);
|
|
ca2 :: () => f(..xs.value);
|
|
|
|
// 4. Closure-sig position — `Closure(..Ts)` / `Closure(..Ts.Arg)`:
|
|
cs1 :: (cb: Closure(..Ts) -> i32) => cb;
|
|
cs2 :: (cb: Closure(..sources.T) -> i32) => cb;
|