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.
2 lines
2 B
Plaintext
2 lines
2 B
Plaintext
0
|