Skip to content

Commit e3b4883

Browse files
feat(v2): add hello world grammar v2 example (#112)
Cherry-pick of `a99dc21` from #109 — the only commit on that branch worth keeping after the v2 grammar work was re-landed on main via PRs #46/#54/#57/#58/#62-#65/#69-#74/#76/#78/#80. Adds `examples/v2/hello.eph` (13 lines) demonstrating the v2 grammar surface: `module std/io`, `extern "wasm" { fn ... }`, `pub fn main`, `let!` linear bindings. Closes #109 (the rest was superseded — see close comment on #109). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 19f37e8 commit e3b4883

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

examples/v2/hello.eph

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module std/io
2+
3+
extern "wasm" {
4+
fn print_i32(val: I32): ()
5+
}
6+
7+
pub fn main() -> I32 {
8+
let! x = 40
9+
let y = 2
10+
let! result = x + y
11+
print_i32(result)
12+
result
13+
}

0 commit comments

Comments
 (0)