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

Fix _!_ binop call with more than 2 arguments

This commit is contained in:
Étienne Fildadut 2022-01-16 00:19:25 +01:00
parent 86862be9f5
commit f05ccdffcc

View file

@ -271,11 +271,23 @@ local function expression(s, state, namespace, current_priority, operating_on)
if not args then if not args then
args = operating_on args = operating_on
else else
args = { if args.type == "list" then -- insert as first element
type = "list", local first_list = args
left = operating_on, while first_list.left.type == "list" do
right = args first_list = first_list.left
} end
first_list.left = {
type = "list",
left = operating_on,
right = first_list.left
}
else
args = {
type = "list",
left = operating_on,
right = args
}
end
end end
-- find compatible variant -- find compatible variant
local variant, err = find_function(state, namespace, name, args, paren_call) local variant, err = find_function(state, namespace, name, args, paren_call)