From 5637676bc45ce9aa3015726485f63a2a5745a45a Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 30 May 2018 14:29:08 -0700 Subject: Dead code cleanup --- core/metaprogramming.nom | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'core/metaprogramming.nom') diff --git a/core/metaprogramming.nom b/core/metaprogramming.nom index 717690d..36f7d34 100644 --- a/core/metaprogramming.nom +++ b/core/metaprogramming.nom @@ -152,8 +152,12 @@ immediately Lua "\(%code as lua expr):remove_free_vars(\(%vars as lua expr));" action [%tree as value] - =lua "nomsu:tree_to_value(\%tree)" - + lua> ".." + if \%tree.type == 'Text' and #\%tree == 1 and type(\%tree[1]) == 'string' then + return \%tree[1] + end + local lua = Lua(\%tree.source, "return ",nomsu:tree_to_lua(\%tree)) + return nomsu:run_lua(lua) action [%tree's stub] =lua "\%tree:get_stub()" -- cgit v1.2.3