aboutsummaryrefslogtreecommitdiff
path: root/spec/outputs
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2021-11-19 13:23:11 +0800
committerLi Jin <dragon-fly@qq.com>2021-11-19 13:23:11 +0800
commit2ff18b4fb66d25d22e5a25fb386fe171853e0b06 (patch)
treed6e6f1671f74a4430b24869c74767aaf0ee2e128 /spec/outputs
parenta8e5aaf64969792741f3a094fe0070ddb5e3bc7d (diff)
downloadyuescript-2ff18b4fb66d25d22e5a25fb386fe171853e0b06.tar.gz
yuescript-2ff18b4fb66d25d22e5a25fb386fe171853e0b06.tar.bz2
yuescript-2ff18b4fb66d25d22e5a25fb386fe171853e0b06.zip
try to fix issue #69 with new macro functions. add builtin macro $MODULE and $LINE.
Diffstat (limited to 'spec/outputs')
-rw-r--r--spec/outputs/macro.lua31
1 files changed, 31 insertions, 0 deletions
diff --git a/spec/outputs/macro.lua b/spec/outputs/macro.lua
index a2430a2..7812182 100644
--- a/spec/outputs/macro.lua
+++ b/spec/outputs/macro.lua
@@ -229,5 +229,36 @@ end
229origin.transform.root.gameObject:Parents():Descendants():SelectEnable():SelectVisible():TagEqual("fx"):Where(function(x) 229origin.transform.root.gameObject:Parents():Descendants():SelectEnable():SelectVisible():TagEqual("fx"):Where(function(x)
230 return x.name:EndsWith("(Clone)") 230 return x.name:EndsWith("(Clone)")
231end):Destroy() 231end):Destroy()
232print((setmetatable({
233 'abc',
234 a = 123,
235}, {
236 __call = function(self)
237 return 998
238 end
239}))[1], (setmetatable({
240 'abc',
241 a = 123,
242}, {
243 __call = function(self)
244 return 998
245 end
246})).a, (setmetatable({
247 'abc',
248 a = 123,
249}, {
250 __call = function(self)
251 return 998
252 end
253}))(), setmetatable({
254 'abc',
255 a = 123,
256}, {
257 __call = function(self)
258 return 998
259 end
260}))
261print("current line: " .. tostring(259))
262-- TODO
232print('abc') 263print('abc')
233return 123 264return 123