refactor(ffi-linkage): Phase 9.3-src — purge 'foreign' from src/ comments + a user-facing diagnostic
Reword every 'foreign' comment to the extern/runtime-class vocabulary matching the renamed identifiers (foreign call→extern call, foreign class→runtime class, foreign path→runtime path, the #foreign-literal comment mentions → extern, etc.). Also fixes two USER-FACING issues: the 'expected … #foreign … after type annotation' parse error no longer advertises the removed keyword, and the Android 'no #jni_main' help diagnostic now shows '#jni_class(…) extern' instead of the rejected '#foreign #jni_class'. Removed the now-dead prefix-#foreign-vs-postfix conflict branch in parseRuntimeClassDecl (the caller rejects #foreign before it runs). src/ now contains 'foreign' ONLY in the hash_foreign token machinery + its 4 rejection messages — the deprecation mechanism (kept per the 9.0 recommendation; the message MUST name #foreign to guide migration). Snapshot-neutral; suite green (646 corpus / 444 unit, 0 failed).
This commit is contained in:
@@ -137,8 +137,8 @@ pub const Tag = enum {
|
||||
hash_swift_class, // Foo :: #swift_class("Module.Type") { ...body... }
|
||||
hash_swift_struct, // Foo :: #swift_struct("Module.Type") { ...body... }
|
||||
hash_swift_protocol, // Foo :: #swift_protocol("Module.Proto") { ...body... }
|
||||
hash_extends, // `#extends Alias;` inside a foreign-class body
|
||||
hash_implements, // `#implements Alias;` inside a foreign-class body
|
||||
hash_extends, // `#extends Alias;` inside a runtime-class body
|
||||
hash_implements, // `#implements Alias;` inside a runtime-class body
|
||||
hash_jni_method_descriptor, // `#jni_method_descriptor("(Sig)Ret")` per-method JNI descriptor override
|
||||
hash_selector, // `#selector("explicit:string")` per-method Obj-C selector override (Phase 3.2)
|
||||
hash_property, // `#property[(modifier, ...)]` field directive — synthesizes getter/setter dispatch (M2.2)
|
||||
|
||||
Reference in New Issue
Block a user