A1.4: Add sugar syntax `public weak parent` ≡ `public { weak parent }`
A1.5: Fix parser hang on unsupported `param: Type` syntax
Key changes:
- A1.4: Extend visibility parser to handle weak modifier (fields.rs)
- A1.5: Shared helper `parse_param_name_list()` with progress-zero detection
- A1.5: Fix 6 vulnerable parameter parsing loops (methods, constructors, functions)
- Tests: Sugar syntax (OK/NG), parser hang (timeout-based)
- Docs: lifecycle.md, EBNF.md, phase-285a1-boxification.md
Additional changes:
- weak() builtin implementation (handlers/weak.rs)
- Leak tracking improvements (leak_tracker.rs)
- Documentation updates (lifecycle, types, memory-finalization, etc.)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
17 lines
386 B
Plaintext
17 lines
386 B
Plaintext
// Phase 285: Leak report test fixture
|
|
// This program creates user boxes that should appear in leak report
|
|
// Expected: With NYASH_LEAK_LOG=1, [lifecycle/leak] output appears
|
|
|
|
box Node { other }
|
|
|
|
static box Main {
|
|
main() {
|
|
local a = new Node()
|
|
local b = new Node()
|
|
a.other = b
|
|
b.other = a
|
|
print("ok: cycle-created")
|
|
return 0
|
|
}
|
|
}
|