ffi 2.4 green: #extends and #implements body items
Two new lexer tokens `hash_extends` / `hash_implements` (global tokens, context-meaningful inside #jni_class bodies — same pattern as #using). `JniClassDecl.methods` refactored into `members: []const JniClassMember`, a tagged union with `method` / `extends` / `implements` variants. Body loop dispatches on the leading token: `#extends Alias;` / `#implements Alias;` consume the alias name and push a non-method member; everything else falls through to the existing method path. The alias on the right of `#extends` is the sx-side name (resolved to the corresponding #jni_class at sema time in a later step), not the foreign Java path — the path lives only in the alias's own directive arg. 123/123 examples green.
This commit is contained in:
@@ -116,6 +116,8 @@ pub const Tag = enum {
|
||||
hash_jni_call, // #jni_call(T)(env, target, "name", "(Sig)R", args...)
|
||||
hash_jni_static_call, // #jni_static_call(T)(class, "name", "(Sig)R", args...)
|
||||
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
|
||||
triple_minus, // ---
|
||||
|
||||
// Special
|
||||
|
||||
Reference in New Issue
Block a user