Logo
Explore Help
Register Sign In
tomoaki/hakorune
1
0
Fork 0
You've already forked hakorune
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
1e1d0315b35ba7e36f9052d248387f06d0cf64e5
hakorune/apps/tests/phase285_userbox_field_basic.hako

16 lines
264 B
Plaintext
Raw Normal View History

feat(phase285w): Implement weak x unary operator syntax Phase 285W-Syntax-0: Migrate weak reference syntax from function call to unary operator for consistency and clarity. **Changes**: - Parser: Add UnaryOperator::Weak variant and parse_unary() handling - MIR: Lower UnaryOp::Weak to emit_weak_new() (reuses existing path) - AST: Add Weak to UnaryOperator enum + Display/JSON support - Tests: Migrate 8 files from `weak(x)` to `weak x` syntax - 7 .hako test files updated - 1 smoke test shell script updated - Cleanup: Remove obsolete weak(x) parser/MIR special cases - Docs: Update Phase 285 README **Syntax Change**: - Old: `local w = weak(x)` (function call) - New: `local w = weak x` (unary operator) **Validation**: All migrated phase285* smoke tests pass (4/4 relevant) **SSOT**: docs/reference/language/lifecycle.md 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-24 17:21:21 +09:00
// Phase 285LLVM-1.3: InstanceBox field access parity
// Goal: VM/LLVM で同じ出力になる
box SomeBox {
x
}
static box Main {
main() {
local sb = new SomeBox()
sb.x = 42
print(sb.x) // Expected: 42
return 0
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.24.2 Page: 35ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API