From 27d6efb5f5a076f825fe2da1875e0cabaf02b4e7 Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 17 Nov 2021 23:03:07 +0800 Subject: + LuaMacro --- Tools/LuaMacro/tests/test-with.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Tools/LuaMacro/tests/test-with.lua (limited to 'Tools/LuaMacro/tests/test-with.lua') diff --git a/Tools/LuaMacro/tests/test-with.lua b/Tools/LuaMacro/tests/test-with.lua new file mode 100644 index 0000000..ac5d0fe --- /dev/null +++ b/Tools/LuaMacro/tests/test-with.lua @@ -0,0 +1,18 @@ +require_ 'macro.with' + +aLongTableName = {} +with aLongTableName do + .a = 1 + .b = {{x=1},{x=2}} + .c = {f = 2} + print(.a,.c.f,.b[1].x) +end + +def_ @ return +def_ F function + +F f(x) @ x+1 end + +print(f(10)) + + -- cgit v1.1-26-g67d0