aboutsummaryrefslogtreecommitdiff
path: root/core/metaprogramming.nom
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-05-04 13:49:09 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-05-04 13:49:20 -0700
commit126f51f955351a4ce85f3f1e6da6e9219ec7e23a (patch)
treea5189914f3dfe94e465518b60dadc4f0422be971 /core/metaprogramming.nom
parenta5bbce315dd9e6861d426bb16a3d792e2a3c0dfc (diff)
Removing varargs from free var functions.
Diffstat (limited to 'core/metaprogramming.nom')
-rw-r--r--core/metaprogramming.nom16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/metaprogramming.nom b/core/metaprogramming.nom
index d4ae624..6d2f764 100644
--- a/core/metaprogramming.nom
+++ b/core/metaprogramming.nom
@@ -28,7 +28,7 @@ immediately
end
local body_lua = \%lua:as_lua(nomsu);
body_lua:convert_to_statements("return ");
- body_lua:remove_free_vars(unpack(args));
+ body_lua:remove_free_vars(args);
body_lua:declare_locals();
lua:append(")\n ", body_lua, "\nend);");
return lua;
@@ -60,7 +60,7 @@ immediately
end
local body_lua = \%body:as_lua(nomsu);
body_lua:convert_to_statements("return ");
- body_lua:remove_free_vars(unpack(args));
+ body_lua:remove_free_vars(args);
body_lua:declare_locals();
lua:append(")\n ", body_lua, "\nend);")
return lua;
@@ -127,14 +127,14 @@ immediately
lua:convert_to_statements();
return lua;
- compile [declare locals in %tree] to
- Lua "\(%tree as lua expr):declare_locals();"
+ compile [declare locals in %code] to
+ Lua value "\(%code as lua expr):declare_locals()"
- compile [declare locals %locals in %tree] to
- Lua "\(%tree as lua expr):declare_locals(\(%locals as lua expr));"
+ compile [declare locals %locals in %code] to
+ Lua value "\(%code as lua expr):declare_locals(\(%locals as lua expr))"
- compile [remove free vars %vars from %tree] to
- Lua "\(%tree as lua expr):remove_free_vars(unpack(\(%vars as lua expr)));"
+ compile [remove free vars %vars from %code] to
+ Lua "\(%code as lua expr):remove_free_vars(\(%vars as lua expr));"
action [%tree as value]
=lua "nomsu:tree_to_value(\%tree)"