mirror of
https://github.com/anoma/juvix.git
synced 2024-12-02 10:47:32 +03:00
ed15e57d8a
* 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.
24 lines
361 B
Plaintext
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]);
|
|
}
|