mirror of
https://github.com/anoma/juvix.git
synced 2024-12-12 04:43:18 +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).
17 lines
207 B
Plaintext
17 lines
207 B
Plaintext
-- case stack height mismatch
|
|
|
|
type list {
|
|
nil : list;
|
|
cons : * -> list -> list;
|
|
}
|
|
|
|
function main() {
|
|
alloc nil;
|
|
case list {
|
|
nil: { push 1; push 2; };
|
|
cons: { push 1; };
|
|
};
|
|
pop;
|
|
ret;
|
|
}
|