diff options
author | Li Jin <dragon-fly@qq.com> | 2021-11-19 13:23:11 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2021-11-19 13:23:11 +0800 |
commit | 2ff18b4fb66d25d22e5a25fb386fe171853e0b06 (patch) | |
tree | d6e6f1671f74a4430b24869c74767aaf0ee2e128 /spec/outputs | |
parent | a8e5aaf64969792741f3a094fe0070ddb5e3bc7d (diff) | |
download | yuescript-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.lua | 31 |
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 | |||
229 | origin.transform.root.gameObject:Parents():Descendants():SelectEnable():SelectVisible():TagEqual("fx"):Where(function(x) | 229 | origin.transform.root.gameObject:Parents():Descendants():SelectEnable():SelectVisible():TagEqual("fx"):Where(function(x) |
230 | return x.name:EndsWith("(Clone)") | 230 | return x.name:EndsWith("(Clone)") |
231 | end):Destroy() | 231 | end):Destroy() |
232 | print((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 | })) | ||
261 | print("current line: " .. tostring(259)) | ||
262 | -- TODO | ||
232 | print('abc') | 263 | print('abc') |
233 | return 123 | 264 | return 123 |