9c6b516453
- Reorganize repository to Rust-style layout: compiler/bootstrap/ compiler/selfhost/ compiler/tests/ library/std/ library/runtime/ tests/ tools/ - Add buxs/ Windows-compatible project root - Add borrow checker tests and implement: - Alias analysis (double mutable borrow detection) - Use-after-move detection for own T - Expand standard library: - Std::Os: Args, Env, Cwd, Chdir - Std::Time: NowMs, NowUs, SleepMs - Std::Process: Run, Output - Std::Io: PrintInt64 (fixes 32-bit truncation bug) - Add examples: os_time.bux, process.bux - Fix PrintInt to use int64_t in C runtime
12 lines
199 B
Plaintext
12 lines
199 B
Plaintext
import Std::Io::PrintLine;
|
|
|
|
func Add(a: int32, b: int32) -> int32 {
|
|
return a + b;
|
|
}
|
|
|
|
func Main() -> int {
|
|
let result: int32 = Add(10, 20);
|
|
PrintLine(c8"Hello from Bux!");
|
|
return 0;
|
|
}
|