diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2018-09-26 13:57:13 -0700 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2018-09-26 13:57:13 -0700 |
| commit | dcff9ecfcf0c3f81cc22bacd082472ea744c9070 (patch) | |
| tree | 48f0c1ec3b6c42112f7e9d9ea40e1855ab3d598e /core/metaprogramming.nom | |
| parent | b43432e647fbb3bb76aa2836e3899d5e407c50f9 (diff) | |
Fix for calling function with non-literal list.
Diffstat (limited to 'core/metaprogramming.nom')
| -rw-r--r-- | core/metaprogramming.nom | 6 |
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" |
