ffi M5.A.next.1b: parser accepts ..$args as a variadic-pack param
Extends parseParams in src/parser.zig:1558 to recognize a leading `..` before the optional `$` sigil and the parameter name. The old `args: ..T` form (variadic marker after the colon) still works — both paths set the same `is_variadic` flag. A pack declaration `..$args` parses as: - `is_variadic = true` (from the leading `..`) - `is_comptime = true` (from the `$` sigil) - `type_expr = inferred_type` (no `:` annotation) The no-colon branch now propagates `is_variadic` and `is_comptime` onto the Param struct so later slices (type rep, impl matching, monomorphisation) can read both flags from the parsed AST without re-deriving from token sequence. `examples/150-pack-parse.sx` flips from rejecting-with-error to positive parse smoke. No semantic effect yet — `foo` is declared but never instantiated. 191/191 example tests + `zig build test` green.
This commit is contained in:
@@ -1 +1 @@
|
||||
1
|
||||
0
|
||||
|
||||
@@ -1 +1 @@
|
||||
/Users/agra/projects/sx/examples/150-pack-parse.sx:15:9: error: expected parameter name
|
||||
pack parse ok
|
||||
|
||||
Reference in New Issue
Block a user