ffi M1.0 (1/3): lock in expression-bodied top-level + struct-method form

sx's '=>' body form (already used for lambdas) works today for
top-level function declarations and struct member methods. Pin
the surface with examples/139-expression-bodied-fn.sx so a
parser regression here surfaces immediately.

Coverage:
- module-top:      double :: (x: s32) -> s32 => x * 2;
- niladic:         answer :: () -> s32 => 42;
- struct method:   total :: (self: *Point) -> s32 => self.x + self.y;

Next: extend the same form to '#objc_class' member methods (the
M2.1(a/b) class-constant + class-method overrides path).
This commit is contained in:
agra
2026-05-25 21:15:44 +03:00
parent bd3033dc5a
commit 6c95b2ae72
3 changed files with 42 additions and 0 deletions

View File

@@ -0,0 +1 @@
0

View File

@@ -0,0 +1,5 @@
double: 14
sum: 7
answer: 42
total: 30
scaled: 90