ffi M1.0 (3/3): accept '=>' body in '#objc_class' member methods
Extends parseForeignClassDecl ([src/parser.zig:1262]) with an arrow arm that mirrors the existing parseFnDecl shape — single- expression body wrapped in a one-statement block so downstream lowering sees the same AST as a brace-body method. Closes the M1.0 surface: '=> expr;' is now valid for top-level functions, struct methods, AND '#objc_class' member methods. The sx-defined class lowering (A.7 dispatch gate) is still gated, so 140-expression-bodied-objc-method.sx exercises parse-only — the body is reachable but the method is never invoked. When M1.2 lights up sx-defined class instantiation, the arrow-body form will flow through unchanged. 169 examples pass (+1 from 140 now green); zig build test green.
This commit is contained in:
@@ -1 +1 @@
|
||||
1
|
||||
0
|
||||
|
||||
@@ -1 +1 @@
|
||||
/Users/agra/projects/sx/examples/140-expression-bodied-objc-method.sx:15:35: error: expected ';'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user