1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-02 10:47:32 +03:00
juvix/tests/Reg/positive/test022.jvr
Łukasz Czajka ed15e57d8a
JuvixReg parser and pretty printer (#2617)
* Closes #2578 
* Implements JuvixReg parser and pretty printer.
* Adds the `juvix dev reg read file.jvr` command.
* Adds the `reg` target to the `compile` commands.
* Adds tests for the JuvixReg parser.
2024-02-09 12:19:29 +01:00

24 lines
361 B
Plaintext

function sapp(* → *) : *;
function id(*) : *;
function main() : *;
function sapp(* → *) : * {
tmp[0] = arg[0];
tmp[1] = arg[0];
tcall tmp[1] (tmp[0]);
}
function id(*) : * {
tmp[0] = arg[0];
ret tmp[0];
}
function main() : * {
prealloc 4;
tmp[0] = 7;
tmp[1] = calloc id ();
tmp[2] = calloc sapp ();
tccall tmp[2] (tmp[1], tmp[0]);
}