-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
588 additions
and
344 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
fn main(x) { | ||
if x is y {} else { y } | ||
if !(x is y) { y } | ||
if x is y || y is z { (y, z) } | ||
while x is y {} | ||
y | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
use std::{io::println, bool::{true, false}}; | ||
|
||
fn main(&io) { | ||
io.print_bool(true); | ||
io.print_bool(true && true); | ||
io.print_bool(true || true); | ||
io.print_bool(true || false); | ||
io.print_bool(false || true); | ||
io.print_bool(!false); | ||
io.print_bool(!!true); | ||
io.println("---"); | ||
io.print_bool(false); | ||
io.print_bool(false || false); | ||
io.print_bool(true && false); | ||
io.print_bool(false && true); | ||
io.print_bool(false && false); | ||
io.print_bool(!true); | ||
io.print_bool(!!false); | ||
|
||
// Test short-circuiting behavior; `()` is an eraser node, | ||
// so would erase `io` if it was evaluated. | ||
io.println("---"); | ||
io.print_bool(true || ()); | ||
io.print_bool(false && ()); | ||
} | ||
|
||
fn print_bool(&io, bool) { | ||
io.println(if bool { "true" } else { "false" }) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
error tests/programs/fail/is_not.vi:3:23 - cannot find `y` in `::is_not::main` | ||
error tests/programs/fail/is_not.vi:4:18 - cannot find `y` in `::is_not::main` | ||
error tests/programs/fail/is_not.vi:5:16 - cannot find `y` in `::is_not::main` | ||
error tests/programs/fail/is_not.vi:5:26 - cannot find `y` in `::is_not::main` | ||
error tests/programs/fail/is_not.vi:5:29 - cannot find `z` in `::is_not::main` | ||
error tests/programs/fail/is_not.vi:7:3 - cannot find `y` in `::is_not::main` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
|
||
Interactions | ||
Total 14_008_829 | ||
Total 14_008_806 | ||
Annihilate 6_004_137 | ||
Commute 0 | ||
Copy 2_000_867 | ||
Erase 1_000_873 | ||
Expand 2_001_376 | ||
Call 2_001_063 | ||
Call 2_001_040 | ||
Branch 1_000_513 | ||
|
||
Memory | ||
Heap 720 B | ||
Allocated 272_172_832 B | ||
Freed 272_172_832 B | ||
Allocated 272_172_464 B | ||
Freed 272_172_464 B |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.