ffi 2.6 green: #jni_method_descriptor("(Sig)Ret") override

New `hash_jni_method_descriptor` lexer token + LSP keyword
classification. `JniMethodDecl` gains `desc_override: ?[]const u8`.
parseJniClassDecl accepts an optional `#jni_method_descriptor("...")`
clause between the return type and the terminating `;`, stashing the
literal as the override. Auto-derivation in Phase 2.8 will treat
this as the precedence override when present.

The 2.6 xfail commit (0ed4799) used the working name `#desc` in its
test file; this commit renames to `#jni_method_descriptor` for
parallel naming with the rest of the FFI directive set (`#jni_call`,
`#jni_class`, `#jni_env`, ...). Test snapshot flips xfail → green.

125/125 examples green.
This commit is contained in:
agra
2026-05-20 10:10:23 +03:00
parent 0ed4799f5f
commit 11021d800d
8 changed files with 29 additions and 10 deletions

View File

@@ -118,6 +118,7 @@ pub const Tag = enum {
hash_jni_class, // Foo :: #jni_class("java/path/Foo") { ...body... }
hash_extends, // `#extends Alias;` inside a #jni_class / #objc_class body
hash_implements, // `#implements Alias;` inside a #jni_class / #objc_class body
hash_jni_method_descriptor, // `#jni_method_descriptor("(Sig)Ret")` per-method JNI descriptor override
triple_minus, // ---
// Special