1
0
Fork 0
mirror of https://github.com/Reuh/anselme.git synced 2025-10-27 16:49:31 +00:00

Script/checkpoint system first draft

This commit is contained in:
Étienne Fildadut 2023-12-31 00:47:55 +01:00
parent 0a835a65d8
commit 4125a4c99b
6 changed files with 116 additions and 8 deletions

View file

@ -6,13 +6,20 @@ return {
"_==_", "(a, b)",
function(state, a, b)
if a.mutable ~= b.mutable then return Boolean:new(false)
elseif a.mutable then
return Boolean:new(a == b)
else
return Boolean:new(a:hash() == b:hash())
end
end
},
{
"_!=_", "(a, b)",
function(state, a, b)
if a.mutable ~= b.mutable then return Boolean:new(true)
else
return Boolean:new(a:hash() ~= b:hash())
end
end
},
{
"!_", "(a)",
function(state, a)