ffi 2.1: parser accepts Foo :: #jni_class("path") { } opaque form

New `hash_jni_class` token + lexer entry, `JniClassDecl` AST node
(alias + java path; body deferred to 2.2+), `parseJniClassDecl`
consuming `("...") { }` and rejecting non-empty bodies for now.
Sema registers the alias as a type_alias symbol; LSP classifies
the directive as a keyword. The 2.0 xfail snapshot flips to
`parse-only ok`, exit 0.

120/120 examples green; zig test clean.
This commit is contained in:
agra
2026-05-20 09:24:14 +03:00
parent 4c670e66f3
commit 32b464e959
8 changed files with 48 additions and 2 deletions

View File

@@ -82,6 +82,7 @@ pub const Lexer = struct {
.{ "#objc_call", Tag.hash_objc_call },
.{ "#jni_call", Tag.hash_jni_call },
.{ "#jni_static_call", Tag.hash_jni_static_call },
.{ "#jni_class", Tag.hash_jni_class },
};
inline for (directives) |d| {
const keyword = d[0];