This commit is contained in:
2024-02-21 14:01:22 +01:00
parent e8dfb94860
commit b6949f6a73
22 changed files with 88 additions and 43 deletions

View File

@ -1,4 +1,4 @@
hello|
$2 -> x|
set 2 -> x|
do print<variable x;>|
goodbye|

View File

@ -1,10 +1,10 @@
hello|
$1 -> x|
$2 -> y|
$5 -> z|
$variable x+variable y -> z| // 3
$5-variable z -> z| // 2
$2*variable z -> x| // 4
$variable x/variable y -> y| // 2
set 1 -> x|
set 2 -> y|
set 5 -> z|
set variable x+variable y -> z| // 3
set 5-variable z -> z| // 2
set 2*variable z -> x| // 4
set variable x/variable y -> y| // 2
do print<variable x;variable y;variable z;>|
goodbye|

View File

@ -1,6 +1,6 @@
hello|
[
$5 -> x|
set 5 -> x|
do print<variable x;>|
]|
goodbye|

View File

@ -1,5 +1,5 @@
hello|
$1 -> x|
maybe $variable x + 1 -> x|
set 1 -> x|
maybe set variable x + 1 -> x|
do print<variable x;>|
goodbye|

View File

@ -1,5 +1,5 @@
hello|
$2 -> x|
set 2 -> x|
do print<'a';> if variable x = 1|
do print<'b';> if variable x = 2|
goodbye|

View File

@ -1,8 +1,8 @@
hello|
$ 1 + 2 * 3 -> x|
set 1 + 2 * 3 -> x|
do print<variable x;>|
$ 5 -> y if variable x = 7|
set 5 -> y if variable x = 7|
do print<variable y;>|
$$5 -> z + 1 -> a|
set set 5 -> z + 1 -> a|
do print<variable z; variable a;>|
goodbye|

View File

@ -1,2 +1,2 @@
$2 -> x|
set 2 -> x|
goodbye|

View File

@ -1,2 +1,2 @@
hello|
$2 -> x|
set 2 -> x|

View File

@ -1,6 +1,6 @@
hello|
${1;2;3;} -> x|
set {1;2;3;} -> x|
do print<variable x;>|
${1;1+1;do print<3;>;} -> y|
set {1;1+1;do print<3;>;} -> y|
do print<variable y{5 - 4};>|
goodbye|

View File

@ -0,0 +1 @@
3

5
tests/13_because.plthy Normal file
View File

@ -0,0 +1,5 @@
hello|
set 2 -> x|
set 3 -> x because variable x = 2|
do print<variable x;>|
goodbye|

View File

@ -0,0 +1 @@
E005: Wrong number of arguments for builtin 'random' (1) at line 2

View File

@ -0,0 +1,3 @@
hello|
do random<2;>|
goodbye|

1
tests/15_C001.expected Normal file
View File

@ -0,0 +1 @@
C001: Because assertion incorrect

5
tests/15_C001.plthy Normal file
View File

@ -0,0 +1,5 @@
hello|
set 2 -> x|
set 3 -> x because variable x = 3|
do print<variable x;>|
goodbye|