mirror of
https://github.com/anoma/juvix.git
synced 2025-01-05 22:46:08 +03:00
8e5f45f16f
This makes the syntax more uniform. It was especially confusing with nested branching, where some closing braces had to and others couldn't be followed by a semicolon. Now all have to be followed by a semicolon (except function ending braces).
19 lines
200 B
Plaintext
19 lines
200 B
Plaintext
-- no matching case branch
|
|
|
|
type list {
|
|
nil : list;
|
|
cons : * -> list -> list;
|
|
}
|
|
|
|
function f(list) {
|
|
push arg[0];
|
|
case list {
|
|
cons: ret;
|
|
};
|
|
}
|
|
|
|
function main() {
|
|
alloc nil;
|
|
tcall f;
|
|
}
|