diff options
Diffstat (limited to 'core/metaprogramming.nom')
| -rw-r--r-- | core/metaprogramming.nom | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/core/metaprogramming.nom b/core/metaprogramming.nom index 5d31c2b..c50f783 100644 --- a/core/metaprogramming.nom +++ b/core/metaprogramming.nom @@ -197,16 +197,14 @@ compile [parse %actions as %body] to (..) end local \%new_body = LuaCode(\%body.source, "local mangle = mangler()", - "\\nlocal tree = ", make_tree(\%body), - "\\nlocal lua = nomsu:compile(tree)", - "\\nreturn lua") + "\\nreturn ", make_tree(\%body)) local ret = \(compile as (compile %actions to %new_body)) return ret" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # TODO: add check for .is_value -compile [%tree as lua expr] to (Lua value "nomsu:compile(\(=lua "nomsu:compile(\%tree)"))") +compile [%tree as lua expr] to (Lua value "nomsu:compile(\(=lua "nomsu:compile(\%tree, nil, true)"), nil, true)") ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
