aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/metaprogramming.nom6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/metaprogramming.nom b/core/metaprogramming.nom
index f92fb0c..00151d5 100644
--- a/core/metaprogramming.nom
+++ b/core/metaprogramming.nom
@@ -91,7 +91,11 @@ lua> "\
compile [call %fn with %args] to:
lua> "\
..local lua = LuaCode.Value(tree.source, nomsu:compile(\%fn), "(")
- lua:concat_append(table.map(\%args, function(a) return nomsu:compile(a) end), ", ")
+ if \%args.type == 'List' then
+ lua:concat_append(table.map(\%args, function(a) return nomsu:compile(a) end), ", ")
+ else
+ lua:append('unpack(', nomsu:compile(\%args), ')')
+ end
lua:append(")")
return lua"