1
1
mirror of https://github.com/anoma/juvix.git synced 2024-11-30 05:42:26 +03:00
juvix/tests/Reg/positive/test012.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

44 lines
843 B
Plaintext

function main() : *;
function main() : * {
tmp[5] = 1;
{
tmp[0] = tmp[5];
tmp[5] = 2;
{
tmp[1] = tmp[5];
tmp[5] = tmp[1];
};
tmp[6] = tmp[0];
tmp[5] = add tmp[6] tmp[5];
{
tmp[1] = tmp[5];
tmp[5] = tmp[1];
tmp[6] = tmp[1];
tmp[5] = mul tmp[6] tmp[5];
{
tmp[2] = tmp[5];
tmp[5] = tmp[2];
tmp[6] = 2;
tmp[5] = add tmp[6] tmp[5];
{
tmp[3] = tmp[5];
tmp[5] = tmp[2];
tmp[6] = tmp[3];
tmp[5] = add tmp[6] tmp[5];
{
tmp[4] = tmp[5];
tmp[5] = tmp[2];
tmp[6] = tmp[3];
tmp[7] = tmp[4];
tmp[6] = add tmp[7] tmp[6];
tmp[5] = add tmp[6] tmp[5];
ret tmp[5];
};
};
};
};
};
}