Initial Commit
This commit is contained in:
789 files changed
+149185
No files matched your search
@@ -0,0 +1,8 @@
|
||||
import std::io;
|
||||
enum word: u8 { a, b, c, first = word::a, last = word::c }
|
||||
enum next: u8 { start = word::last, d, e, stop = next::e }
|
||||
def name(w: word): int { return match w { first => 1, b => 2, last => 3 }; }
|
||||
def main(): void {
|
||||
println($"{word::first} {word::last as u8} {word::first == word::a} {2 as word}");
|
||||
println($"{next::start as u8} {next::d as u8} {next::stop} {name(word::c)} {name(word::a)}");
|
||||
}
|
||||
Reference in new issue
Block a user