mirror of
https://github.com/Reuh/anselme.git
synced 2025-10-27 16:49:31 +00:00
Add _;
This commit is contained in:
parent
e7cfab524a
commit
f5382d2912
4 changed files with 8 additions and 1 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ common = {
|
|||
"_^_",
|
||||
"_._", "_!_",
|
||||
-- suffix unop
|
||||
"_;",
|
||||
"_!",
|
||||
-- special
|
||||
"()",
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ local prefix_unops_prio = {
|
|||
[12] = { "&" }
|
||||
}
|
||||
local suffix_unops_prio = {
|
||||
[1] = {},
|
||||
[1] = { ";" },
|
||||
[2] = {},
|
||||
[3] = {},
|
||||
[4] = {},
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue