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:
parent
86862be9f5
commit
f05ccdffcc
1 changed files with 17 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue