diff options
| author | Baitinq <[email protected]> | 2025-03-12 00:47:31 +0100 |
|---|---|---|
| committer | Baitinq <[email protected]> | 2025-03-12 00:47:43 +0100 |
| commit | da0788140e7afbc9b0bcbb937a29e2b08de08ec7 (patch) | |
| tree | ef6435c7c91f40926f01f5faa9b4dbc2946a5caf /examples/10.src | |
| parent | Codegen: add bundled llvm (diff) | |
| parent | Codegen: Fix bug with functions without name (diff) | |
| download | pry-lang-da0788140e7afbc9b0bcbb937a29e2b08de08ec7.tar.gz pry-lang-da0788140e7afbc9b0bcbb937a29e2b08de08ec7.tar.bz2 pry-lang-da0788140e7afbc9b0bcbb937a29e2b08de08ec7.zip | |
Merge branch 'master' into native-llvm
Diffstat (limited to 'examples/10.src')
| -rw-r--r-- | examples/10.src | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/examples/10.src b/examples/10.src index 0ec38ea..59f91e1 100644 --- a/examples/10.src +++ b/examples/10.src @@ -1,14 +1,16 @@ let main = () => i64 { let counter = 0; - while !(counter == 10) { + while counter < 10 { print(counter); counter = counter + 1; }; - while counter == 0 { - print(0); + while true { + if counter == 10 { + return counter; + }; }; - return counter; + return 1; }; |