mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-27 16:49:31 +00:00
Add for loops
This commit is contained in:
parent
a212dd7fd1
commit
efb99a9ed7
28 changed files with 284 additions and 21 deletions
|
|
@ -1,8 +1,8 @@
|
|||
--# run #--
|
||||
--- text ---
|
||||
| {}"" {}"type(\"kg\", 5)" {}"" |
|
||||
| {}"" {}"type(5, \"kg\")" {}"" |
|
||||
--- text ---
|
||||
| {}"" {}"type(\"kg\", 12)" {}"" |
|
||||
| {}"" {}"type(12, \"kg\")" {}"" |
|
||||
--- error ---
|
||||
[0m[31m[0m[31mtype check failure for weigh; 32 does not satisfy $(x) type(x) == t[0m
|
||||
↳ from [4mtest/tests/constrained variable assignement.ans:9:7[0m in assignment: [2mweigh = 32[0m[0m
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
--# run #--
|
||||
--- text ---
|
||||
| {}"" {}"type(\"kg\", 5)" {}"" |
|
||||
| {}"" {}"type(5, \"kg\")" {}"" |
|
||||
--- text ---
|
||||
| {}"" {}"12" {}"" |
|
||||
--- return ---
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
--- text ---
|
||||
| {}"" {}"42" {}"" |
|
||||
--- error ---
|
||||
[0m[31m[0m[31m[0m[31midentifier "z" is undefined in branch cf017f8a-7c86-4871-109af-6658231331e6[0m
|
||||
[0m[31m[0m[31m[0m[31midentifier "z" is undefined in branch 7dfcaa5b-2163-4f36-116ed-c4ab6bc8d28b[0m
|
||||
↳ from [4mtest/tests/exported variable nested.ans:12:3[0m in identifier: [2mz[0m[0m
|
||||
↳ from [4mtest/tests/exported variable nested.ans:12:1[0m in text interpolation: [2m| {z} |[0m[0m
|
||||
↳ from [4m?[0m in block: [2m:f = ($() _)…[0m
|
||||
|
|
|
|||
8
test/results/for break.ans
Normal file
8
test/results/for break.ans
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
--# run #--
|
||||
--- text ---
|
||||
| {}"" {}"1" {}"" |
|
||||
| {}"" {}"2" {}"" |
|
||||
--- return ---
|
||||
()
|
||||
--# saved #--
|
||||
{}
|
||||
9
test/results/for continue.ans
Normal file
9
test/results/for continue.ans
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
--# run #--
|
||||
--- text ---
|
||||
| {}"" {}"1" {}"" |
|
||||
| {}"" {}"2" {}"" |
|
||||
| {}"" {}"4" {}"" |
|
||||
--- return ---
|
||||
()
|
||||
--# saved #--
|
||||
{}
|
||||
15
test/results/for invalid iterator.ans
Normal file
15
test/results/for invalid iterator.ans
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
--# run #--
|
||||
--- error ---
|
||||
[0m[31m[0m[31m[0m[31m[0m[31m[0m[31m[0m[31mcan't call overload overload<($(table::($(x) <lua function>)) _), ($(tuple::($(x) type(x) == "tuple" | type(x) == "list")) _), ($(range::($(x) type(x) == t)) _), ($(s::($(x) <lua function>)) <lua function>)>: no function match (42), possible functions were:
|
||||
• (table::($(x) <lua function>)): type check failure for parameter table in function (table::($(x) <lua function>))
|
||||
• (tuple::($(x) type(x) == "tuple" | type(x) == "list")): type check failure for parameter tuple in function (tuple::($(x) type(x) == "tuple" | type(x) == "list"))
|
||||
• (range::($(x) type(x) == t)): type check failure for parameter range in function (range::($(x) type(x) == t))
|
||||
• (s::($(x) <lua function>)): type check failure for parameter s in function (s::($(x) <lua function>))[0m
|
||||
↳ from [4mfor.ans:3:18[0m in call: [2miter(var)[0m[0m
|
||||
↳ from [4mfor.ans:3:12[0m in definition: [2m:iterator = iter(var)[0m[0m
|
||||
↳ from [4mfor.ans:2:1[0m in block: [2m:iterator = iter(var)…[0m[0m
|
||||
↳ from [4mfor.ans:2:68[0m in call: [2m_[0m[0m
|
||||
↳ from [4mtest/tests/for invalid iterator.ans:1:4[0m in call: [2mfor(:x, 42)[0m[0m
|
||||
↳ from [4m?[0m in block: [2mfor(:x, 42)…[0m
|
||||
--# saved #--
|
||||
{}
|
||||
10
test/results/for list.ans
Normal file
10
test/results/for list.ans
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
--# run #--
|
||||
--- text ---
|
||||
| {}"" {}"7" {}"" |
|
||||
| {}"" {}"96" {}"" |
|
||||
| {}"" {}"a" {}"" |
|
||||
| {}"" {}"3" {}"" |
|
||||
--- return ---
|
||||
()
|
||||
--# saved #--
|
||||
{}
|
||||
38
test/results/for range.ans
Normal file
38
test/results/for range.ans
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
--# run #--
|
||||
--- text ---
|
||||
| {}"-" |
|
||||
| {}"" {}"1" {}"" |
|
||||
| {}"" {}"2" {}"" |
|
||||
| {}"" {}"3" {}"" |
|
||||
| {}"" {}"4" {}"" |
|
||||
| {}"" {}"5" {}"" |
|
||||
--- text ---
|
||||
| {}"-" |
|
||||
| {}"" {}"2" {}"" |
|
||||
| {}"" {}"3" {}"" |
|
||||
| {}"" {}"4" {}"" |
|
||||
| {}"" {}"5" {}"" |
|
||||
| {}"" {}"6" {}"" |
|
||||
| {}"" {}"7" {}"" |
|
||||
--- text ---
|
||||
| {}"-" |
|
||||
| {}"" {}"2" {}"" |
|
||||
| {}"" {}"5" {}"" |
|
||||
--- text ---
|
||||
| {}"-" |
|
||||
| {}"" {}"4" {}"" |
|
||||
| {}"" {}"3" {}"" |
|
||||
| {}"" {}"2" {}"" |
|
||||
| {}"" {}"1" {}"" |
|
||||
| {}"" {}"0" {}"" |
|
||||
--- text ---
|
||||
| {}"-" |
|
||||
--- text ---
|
||||
| {}"-" |
|
||||
--- text ---
|
||||
| {}"-" |
|
||||
| {}"" {}"4" {}"" |
|
||||
--- return ---
|
||||
()
|
||||
--# saved #--
|
||||
{}
|
||||
10
test/results/for struct.ans
Normal file
10
test/results/for struct.ans
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
--# run #--
|
||||
--- text ---
|
||||
| {}"" {}"true" |
|
||||
| {}"" {}"true" |
|
||||
| {}"" {}"true" |
|
||||
| {}"" {}"true" |
|
||||
--- return ---
|
||||
()
|
||||
--# saved #--
|
||||
{}
|
||||
10
test/results/for table.ans
Normal file
10
test/results/for table.ans
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
--# run #--
|
||||
--- text ---
|
||||
| {}"" {}"true" |
|
||||
| {}"" {}"true" |
|
||||
| {}"" {}"true" |
|
||||
| {}"" {}"true" |
|
||||
--- return ---
|
||||
()
|
||||
--# saved #--
|
||||
{}
|
||||
11
test/results/for tuple.ans
Normal file
11
test/results/for tuple.ans
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--# run #--
|
||||
--- text ---
|
||||
| {}"" {}"2" {}"" |
|
||||
| {}"" {}"5" {}"" |
|
||||
| {}"" {}"7" {}"" |
|
||||
| {}"" {}"1" {}"" |
|
||||
| {}"" {}"8" {}"" |
|
||||
--- return ---
|
||||
()
|
||||
--# saved #--
|
||||
{}
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
--- text ---
|
||||
| {}"" {}"idk" {}" is esperanto" |
|
||||
--- error ---
|
||||
[0m[31m[0m[31mcan't call overload overload<($(name::($(x) type(x) == t)) _), ($(name::($(x) type(x) == t)) _)>: no function match (type("nope", 5)), possible functions were:
|
||||
[0m[31m[0m[31mcan't call overload overload<($(name::($(x) type(x) == t)) _), ($(name::($(x) type(x) == t)) _)>: no function match (type(5, "nope")), possible functions were:
|
||||
• (name::($(x) type(x) == t)): type check failure for parameter name in function (name::($(x) type(x) == t))
|
||||
• (name::($(x) type(x) == t)): type check failure for parameter name in function (name::($(x) type(x) == t))[0m
|
||||
↳ from [4mtest/tests/function custom type dispatch error.ans:14:2[0m in call: [2ma(type(5, "nope"))[0m[0m
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
--# run #--
|
||||
--- text ---
|
||||
| {}"c" |
|
||||
--- text ---
|
||||
| {}"b" |
|
||||
--- text ---
|
||||
| {}"a" |
|
||||
--- text ---
|
||||
| {}"b" |
|
||||
| {}"c" |
|
||||
--- text ---
|
||||
| {}"b" |
|
||||
| {}"a" |
|
||||
--- text ---
|
||||
| {}"a" |
|
||||
--- text ---
|
||||
| {}"c" |
|
||||
--- return ---
|
||||
()
|
||||
--# saved #--
|
||||
{"a.checkpoint":false, "a.run":1, "b.checkpoint":false, "b.run":3, "c.checkpoint":false, "c.run":1}
|
||||
{"a.checkpoint":false, "a.run":3, "c.checkpoint":false, "c.run":2}
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
--# run #--
|
||||
--- error ---
|
||||
[0m[31m[0m[31m[0m[31midentifier "b" is undefined in branch cf017f8a-7c86-4871-109af-6658231331e6[0m
|
||||
[0m[31m[0m[31m[0m[31midentifier "b" is undefined in branch 7dfcaa5b-2163-4f36-116ed-c4ab6bc8d28b[0m
|
||||
↳ from [4mtest/tests/function scope wrong.ans:4:7[0m in identifier: [2mb[0m[0m
|
||||
↳ from [4mtest/tests/function scope wrong.ans:4:1[0m in text interpolation: [2m| a: {b} |[0m[0m
|
||||
↳ from [4m?[0m in block: [2m:a = ($() _)…[0m
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue