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

Add variable reference and use them in alias(ref, id)

This commit is contained in:
Étienne Fildadut 2021-12-09 14:11:18 +01:00
parent 037654ebcf
commit acb8945dec
11 changed files with 138 additions and 45 deletions

View file

@ -145,7 +145,22 @@ types.anselme = {
return k
end
},
["function reference"] = nil,
["function reference"] = {
format = function(val)
if #val > 1 then
return ("&(%s)"):format(table.concat(val, ", "))
else
return ("&%s"):format(table.concat(val, ", "))
end
end,
to_lua = nil
},
["variable reference"] = {
format = function(val)
return ("&%s"):format(val)
end,
to_lua = nil
},
-- internal types
["event buffer"] = {
format = function(val) -- triggered from subtexts