Move examples/*.sx and their expected/ snapshots into per-category subfolders (examples/<category>/...). Folder = leading filename token, with ffi-objc/ffi-jni kept whole; filenames are unchanged. The corpus runner and LSP sweep now discover each category's expected/ dir, while issues/ stays flat. Example 1058's repo-root-relative companion import is made file-relative. Path strings embedded in 164 snapshots were regenerated (path-only changes). Test-layout docs in CLAUDE.md updated.
16 lines
610 B
Plaintext
16 lines
610 B
Plaintext
// extern data global (FFI-linkage stream, Phase 1.2): reference a symbol
|
|
// defined elsewhere (here libSystem's __stdinp) via the bare `extern`
|
|
// linkage modifier on a typed var decl — the extern-named counterpart of
|
|
// `<name> : <type> extern;` (see examples/1205). The optional
|
|
// `extern [LIB] ["csym"]` tail mirrors the fn form; bare here (the sx name
|
|
// IS the C symbol, resolved against the default-linked libSystem).
|
|
#import "modules/std.sx";
|
|
|
|
__stdinp : *void extern;
|
|
|
|
main :: () -> i32 {
|
|
addr_bits : u64 = xx @__stdinp;
|
|
print("stdin extern global non-null: {}\n", addr_bits != 0);
|
|
0
|
|
}
|