val helper function

This commit is contained in:
Kistaro Windrider 2023-10-07 23:57:27 -07:00
parent fd68ef88ec
commit 62fe5f51d3
Signed by: kistaro
SSH Key Fingerprint: SHA256:TBE2ynfmJqsAf0CP6gsflA0q5X5wD5fVKWPsZ7eVUg8

View File

@ -459,6 +459,16 @@ function parser:saveas(prev, name, sel)
self[name] = sel and prev[sel] or prev self[name] = sel and prev[sel] or prev
end end
-- returns its args, ignoring
-- prev. Used to stuff things
-- into prev. args are packed
-- if there's multiple.
function parser:val(_, ...)
local ret := pack(...)
if (#ret == 1) return ret[1]
return ret
end
-->8 -->8
--ship behavior --ship behavior