From 28cd9ae0b7a09d8f2cd0cd929f1ebdce4b081502 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Tue, 15 May 2018 15:21:32 -0700 Subject: More API cleanup, and fixed a bug with optimized lua files generating spurious circular import errors. --- core/metaprogramming.nom | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'core/metaprogramming.nom') diff --git a/core/metaprogramming.nom b/core/metaprogramming.nom index eafe583..475cdeb 100644 --- a/core/metaprogramming.nom +++ b/core/metaprogramming.nom @@ -20,7 +20,7 @@ immediately lua:append("function(tree"); local args = {}; for i,tok in ipairs(\%actions.value[1].value) do - if tok.type == "Var" then args[#args+1] = nomsu:var_to_lua_identifier(tok.value); end + if tok.type == "Var" then args[#args+1] = tok:as_lua(nomsu); end end for i, arg in ipairs(args) do lua:append(", "); @@ -52,7 +52,7 @@ immediately lua:append("function("); local args = {}; for i,tok in ipairs(\%actions.value[1].value) do - if tok.type == "Var" then args[#args+1] = nomsu:var_to_lua_identifier(tok.value); end + if tok.type == "Var" then args[#args+1] = tok:as_lua(nomsu); end end for i, arg in ipairs(args) do lua:append(arg); @@ -83,7 +83,7 @@ immediately lua:append("function(tree"); local args = {}; for i,tok in ipairs(\%shorthand.value[1].value) do - if tok.type == "Var" then args[#args+1] = nomsu:var_to_lua_identifier(tok.value); end + if tok.type == "Var" then args[#args+1] = tostring(tok:as_lua(nomsu)); end end for i, arg in ipairs(args) do lua:append(", "); @@ -157,7 +157,7 @@ immediately immediately compile [nomsu] to: Lua value "nomsu" - compile [%var as lua identifier] to: Lua value "nomsu:var_to_lua_identifier(\(%var as lua expr))" + compile [%var as lua identifier] to: Lua value "\(%var as lua expr):as_lua(nomsu)" # Compiler tools immediately -- cgit v1.2.3