diff options
| author | Bruce Hill <bitbucket@bruce-hill.com> | 2018-05-30 14:29:08 -0700 |
|---|---|---|
| committer | Bruce Hill <bitbucket@bruce-hill.com> | 2018-05-30 14:29:15 -0700 |
| commit | 5637676bc45ce9aa3015726485f63a2a5745a45a (patch) | |
| tree | b6acf5fd499c393fcb59447fc8d80c1d1a3b2746 /core/metaprogramming.nom | |
| parent | b3df63eb1044a740e205524aaa37bebe08bd169e (diff) | |
Dead code cleanup
Diffstat (limited to 'core/metaprogramming.nom')
| -rw-r--r-- | core/metaprogramming.nom | 8 |
1 files changed, 6 insertions, 2 deletions
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()" |
