diff options
author | Li Jin <dragon-fly@qq.com> | 2021-10-12 10:04:44 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2021-10-12 10:04:44 +0800 |
commit | 60a979e224f26117f5be82bfca757a2483cef0fd (patch) | |
tree | 7c6af44f6dcada1f23979b820ba830251997b161 /spec/outputs/multiline_chain.lua | |
parent | a19b242cbaf53721b20a3163dd06f43e9ef2b487 (diff) | |
download | yuescript-60a979e224f26117f5be82bfca757a2483cef0fd.tar.gz yuescript-60a979e224f26117f5be82bfca757a2483cef0fd.tar.bz2 yuescript-60a979e224f26117f5be82bfca757a2483cef0fd.zip |
fix test.
Diffstat (limited to 'spec/outputs/multiline_chain.lua')
-rw-r--r-- | spec/outputs/multiline_chain.lua | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/spec/outputs/multiline_chain.lua b/spec/outputs/multiline_chain.lua new file mode 100644 index 0000000..fea7bc6 --- /dev/null +++ b/spec/outputs/multiline_chain.lua | |||
@@ -0,0 +1,91 @@ | |||
1 | local x = a.b.c.d | ||
2 | x.y = a.b:c() | ||
3 | func(1, arg2.value:get(), arg3.value:get(), { | ||
4 | 1, | ||
5 | ((function() | ||
6 | if x ~= nil then | ||
7 | local _obj_0 = x.y | ||
8 | if _obj_0 ~= nil then | ||
9 | return _obj_0.z | ||
10 | end | ||
11 | return nil | ||
12 | end | ||
13 | return nil | ||
14 | end)() ~= nil), | ||
15 | 3 | ||
16 | }) | ||
17 | local tbb = { | ||
18 | k1 = a:b(123).c(), | ||
19 | k2 = { | ||
20 | w1 = a().b:c() | ||
21 | } | ||
22 | } | ||
23 | local tb | ||
24 | if f2 ~= nil then | ||
25 | tb = f2("abc", f1({ }).a) | ||
26 | end | ||
27 | local f | ||
28 | f = function() | ||
29 | local _accum_0 = { } | ||
30 | local _len_0 = 1 | ||
31 | local _list_0 = vals | ||
32 | for _index_0 = 1, #_list_0 do | ||
33 | local _des_0 = _list_0[_index_0] | ||
34 | local a = _des_0[1] | ||
35 | _accum_0[_len_0] = a.b:c(123) | ||
36 | _len_0 = _len_0 + 1 | ||
37 | end | ||
38 | return _accum_0 | ||
39 | end | ||
40 | local f1 | ||
41 | f1 = function() | ||
42 | return x, a:b(123).c("abc") | ||
43 | end | ||
44 | local result = origin.transform.root.gameObject:Parents():Descendants():SelectEnable():SelectVisible():TagEqual("fx"):Where(function(x) | ||
45 | if x:IsTargeted() then | ||
46 | return false | ||
47 | end | ||
48 | return x.name:EndsWith("(Clone)") | ||
49 | end):Destroy() | ||
50 | origin.transform.root.gameObject:Parents():Descendants():SelectEnable():SelectVisible():TagEqual("fx"):Where(function(x) | ||
51 | return x.name:EndsWith("(Clone)") | ||
52 | end):Destroy() | ||
53 | do | ||
54 | local _with_0 = item | ||
55 | _with_0.itemFieldA = 123 | ||
56 | _with_0:callMethod():chainCall() | ||
57 | _with_0:callMethod():chainCall() | ||
58 | _with_0:chainCall() | ||
59 | local _exp_0 = _with_0.itemFieldB:getValue() | ||
60 | if "Valid" == _exp_0 or _with_0:getItemState() == _exp_0 then | ||
61 | _with_0:itemMethodA():getValue() | ||
62 | else | ||
63 | _with_0:itemMethodB():getValue() | ||
64 | end | ||
65 | local a | ||
66 | if _with_0.itemFieldC then | ||
67 | a = _with_0.itemFieldD | ||
68 | else | ||
69 | a = _with_0.itemFieldE | ||
70 | end | ||
71 | local _list_0 = values | ||
72 | for _index_0 = 1, #_list_0 do | ||
73 | local v = _list_0[_index_0] | ||
74 | _with_0:itemMethodC(v) | ||
75 | end | ||
76 | for i = 1, counter do | ||
77 | _with_0:itemMethodC(i) | ||
78 | end | ||
79 | if not _with_0.b then | ||
80 | do | ||
81 | local _accum_0 = { } | ||
82 | local _len_0 = 1 | ||
83 | while _with_0.itemFieldD do | ||
84 | _accum_0[_len_0] = _with_0:itemNext():get() | ||
85 | _len_0 = _len_0 + 1 | ||
86 | end | ||
87 | _with_0.c = _accum_0 | ||
88 | end | ||
89 | end | ||
90 | end | ||
91 | return nil | ||