diff options
Diffstat (limited to 'Tools/LuaMacro/tests/test-block.lua')
-rw-r--r-- | Tools/LuaMacro/tests/test-block.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Tools/LuaMacro/tests/test-block.lua b/Tools/LuaMacro/tests/test-block.lua new file mode 100644 index 0000000..22c5ae5 --- /dev/null +++ b/Tools/LuaMacro/tests/test-block.lua @@ -0,0 +1,13 @@ +-- in this case, a simple statement macro can be used
+-- `block ... end` expands to `(function() ... end)`
+
+def_ block (function() _END_")"
+
+function peval(fun)
+ print(fun())
+end
+
+peval block
+ return 10,'hello',54
+end
+
|