aboutsummaryrefslogtreecommitdiff
path: root/core.moon
diff options
context:
space:
mode:
Diffstat (limited to 'core.moon')
-rwxr-xr-xcore.moon13
1 files changed, 13 insertions, 0 deletions
diff --git a/core.moon b/core.moon
index 9328676..fb694ef 100755
--- a/core.moon
+++ b/core.moon
@@ -194,5 +194,18 @@ if (not %condition) %body
g\def [[do %action]], (vars)=> return vars.action(self,vars)
+g\defmacro [[lua %lua_code]], (vars,helpers,ftype)=>
+ with helpers
+ lua_code = vars.lua_code.value
+ switch lua_code.type
+ when "List"
+ .lua table.concat[i.value.value for i in *lua_code.value]
+ else
+ .lua(lua_code.value)
+ return nil
+
+g\defmacro [[macro %spec %body]], (vars,helpers,ftype)=>
+ self\simplemacro vars.spec.value.value, vars.body.value.value.src
+
return g