aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/metaprogramming.nom8
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()"