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

@ -270,6 +270,17 @@ local function expression(s, state, namespace, current_priority, operating_on)
-- add first argument
if not args then
args = operating_on
else
if args.type == "list" then -- insert as first element
local first_list = args
while first_list.left.type == "list" do
first_list = first_list.left
end
first_list.left = {
type = "list",
left = operating_on,
right = first_list.left
}
else
args = {
type = "list",
@ -277,6 +288,7 @@ local function expression(s, state, namespace, current_priority, operating_on)
right = args
}
end
end
-- find compatible variant
local variant, err = find_function(state, namespace, name, args, paren_call)
if not variant then return variant, err end