1
0
Fork 0
mirror of https://github.com/Reuh/anselme.git synced 2025-10-27 16:49:31 +00:00
This commit is contained in:
Étienne Fildadut 2021-12-12 16:31:19 +01:00
parent e7cfab524a
commit f5382d2912
4 changed files with 8 additions and 1 deletions

View file

@ -881,6 +881,8 @@ This only works on strings:
`a ; b`: evaluate a, discard its result, then evaluate b. Returns the result of b.
`a;`: evaluate a, discard its result, returns nil.
`a : b`: evaluate a and b, returns a new pair with a as key and b as value.
`a :: b`: evaluate a and b, returns a new typed value with a as value and b as type.

View file

@ -46,6 +46,7 @@ common = {
"_^_",
"_._", "_!_",
-- suffix unop
"_;",
"_!",
-- special
"()",

View file

@ -31,7 +31,7 @@ local prefix_unops_prio = {
[12] = { "&" }
}
local suffix_unops_prio = {
[1] = {},
[1] = { ";" },
[2] = {},
[3] = {},
[4] = {},

View file

@ -7,6 +7,10 @@ lua_functions = {
mode = "raw",
value = function(a, b) return b end
},
["_;(a)"] = {
mode = "raw",
value = function(a) return { type = "nil", value = nil } end
},
-- comparaison
["_==_(a, b)"] = {
mode = "raw",