October commit

- custom parser support and infra
- type-tagging and traits (untested)
- match expressions
This commit is contained in:
2023-10-24 22:17:37 +01:00
parent c961506a3a
commit f77e4fd90a
73 changed files with 1904 additions and 558 deletions

21
examples/match/main.orc Normal file
View File

@@ -0,0 +1,21 @@
import std::to_string
const foo := t[option::some "world!", option::none]
const test1 := match foo {
t[option::some balh, option::none] => balh;
}
const bar := map::new[
"age" = 22,
"name" = "lbfalvy",
"is_alive" = true,
"species" = "human",
"greeting" = "Hello"
]
const test2 := match bar {
map::having ["is_alive" = true, "greeting" = foo] => foo
}
const main := test2 ++ ", " ++ test1