diff options
author | Li Jin <dragon-fly@qq.com> | 2021-02-17 11:22:07 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2021-02-17 11:22:07 +0800 |
commit | 7066392d1c974065181d95d93274136dcd625d43 (patch) | |
tree | cf51eafc2c52cbc12246a306bca172d799193d30 /spec/inputs/multiline_chain.yue | |
parent | 90cd12ad9ef465f3e435e1bd034dcfbe4e19d016 (diff) | |
download | yuescript-7066392d1c974065181d95d93274136dcd625d43.tar.gz yuescript-7066392d1c974065181d95d93274136dcd625d43.tar.bz2 yuescript-7066392d1c974065181d95d93274136dcd625d43.zip |
stop reusing variables, rename project.
Diffstat (limited to 'spec/inputs/multiline_chain.yue')
-rw-r--r-- | spec/inputs/multiline_chain.yue | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/spec/inputs/multiline_chain.yue b/spec/inputs/multiline_chain.yue new file mode 100644 index 0000000..d582ed0 --- /dev/null +++ b/spec/inputs/multiline_chain.yue | |||
@@ -0,0 +1,98 @@ | |||
1 | x = a | ||
2 | .b | ||
3 | .c | ||
4 | --[[chain item]] .d | ||
5 | |||
6 | x | ||
7 | .y = a | ||
8 | .b | ||
9 | \c! | ||
10 | |||
11 | func 1, arg2 | ||
12 | .value | ||
13 | \get!, arg3 | ||
14 | .value | ||
15 | \get! | ||
16 | * 1 | ||
17 | * x? | ||
18 | .y? | ||
19 | .z? | ||
20 | * 3 | ||
21 | |||
22 | tbb = | ||
23 | k1: a | ||
24 | \b 123 | ||
25 | .c! | ||
26 | k2: | ||
27 | w1: a! | ||
28 | .b | ||
29 | \c! | ||
30 | |||
31 | tb = f1{} | ||
32 | .a | ||
33 | |> f2? "abc", _ | ||
34 | |||
35 | f = -> [a | ||
36 | .b | ||
37 | \c 123 for {a} in *vals] | ||
38 | |||
39 | f1 = -> x, a | ||
40 | \b 123 | ||
41 | .c "abc" | ||
42 | |||
43 | result = origin | ||
44 | .transform.root | ||
45 | .gameObject | ||
46 | \Parents! | ||
47 | \Descendants! | ||
48 | \SelectEnable! | ||
49 | \SelectVisible! | ||
50 | \TagEqual "fx" | ||
51 | \Where (x)-> | ||
52 | if x\IsTargeted! | ||
53 | return false | ||
54 | x.name\EndsWith "(Clone)" | ||
55 | \Destroy! | ||
56 | |||
57 | origin.transform.root.gameObject | ||
58 | \Parents!\Descendants! | ||
59 | \SelectEnable! | ||
60 | \SelectVisible! | ||
61 | \TagEqual "fx" | ||
62 | \Where (x)-> x.name\EndsWith "(Clone)" | ||
63 | \Destroy! | ||
64 | |||
65 | with item | ||
66 | .itemFieldA = 123 | ||
67 | |||
68 | \callMethod!\chainCall! | ||
69 | |||
70 | \callMethod! | ||
71 | \chainCall! | ||
72 | \chainCall! | ||
73 | |||
74 | switch .itemFieldB | ||
75 | \getValue! | ||
76 | when "Valid", \getItemState! | ||
77 | \itemMethodA!\getValue! | ||
78 | else | ||
79 | \itemMethodB! | ||
80 | \getValue! | ||
81 | |||
82 | a = if .itemFieldC | ||
83 | .itemFieldD | ||
84 | else | ||
85 | .itemFieldE | ||
86 | |||
87 | for v in *values | ||
88 | \itemMethodC v | ||
89 | |||
90 | for i = 1, counter | ||
91 | \itemMethodC i | ||
92 | |||
93 | unless .b | ||
94 | .c = while .itemFieldD | ||
95 | \itemNext! | ||
96 | \get! | ||
97 | |||
98 | nil | ||