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

@@ -539,6 +539,7 @@ pub const JniMethodDecl = struct {
param_names: []const []const u8,
return_type: ?*Node, // null = void
is_static: bool = false, // true for `static name :: ...`
desc_override: ?[]const u8 = null, // `#desc("(Sig)Ret")` — skips auto-derivation in 2.8+
};
pub const JniFieldDecl = struct {