ffi 2.2 green: parser collects #jni_class instance method body items

New `JniMethodDecl` AST struct (name, params, param_names,
return_type — no body, foreign declaration). `JniClassDecl.body`
becomes `methods: []const JniMethodDecl`. parseJniClassDecl loops
over body items, parsing each `name :: (self: *Self, args...) -> Ret;`
similarly to parseProtocolDecl but requiring `;` (no body brace).

`static`, fields, `#extends`, `#implements`, and the other six
directive forms land in 2.3–2.7. Sema/lower still treat the decl
as an opaque type alias — descriptor derivation arrives in 2.8+.

121/121 examples green.
This commit is contained in:
agra
2026-05-20 09:30:02 +03:00
parent f5da453af1
commit a2a2e83af0
4 changed files with 57 additions and 7 deletions

View File

@@ -1 +1 @@
1
0

View File

@@ -1 +1 @@
/Users/agra/projects/sx/examples/ffi-jni-class-02-method.sx:14:5: error: non-empty `#jni_class` body not yet supported (Phase 2.1 accepts only the empty/opaque form)
parse-only ok