aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/inputs/multiline_chain.mp67
-rw-r--r--spec/inputs/syntax.mp15
2 files changed, 67 insertions, 15 deletions
diff --git a/spec/inputs/multiline_chain.mp b/spec/inputs/multiline_chain.mp
new file mode 100644
index 0000000..e1e363f
--- /dev/null
+++ b/spec/inputs/multiline_chain.mp
@@ -0,0 +1,67 @@
1x = a
2 .b
3
4x
5 .y = a
6 \b!
7
8func 1, arg2
9 .value
10 \get!, arg3
11 .value
12 \get!
13
14result = origin
15 .transform.root
16 .gameObject
17 \Parents!
18 \Descendants!
19 \SelectEnable!
20 \SelectVisible!
21 \TagEqual "fx"
22 \Where (x)->
23 if x\IsTargeted!
24 return false
25 x.name\EndsWith "(Clone)"
26 \Destroy!
27
28origin.transform.root.gameObject
29 \Parents!\Descendants!
30 \SelectEnable!
31 \SelectVisible!
32 \TagEqual "fx"
33 \Where (x)-> x.name\EndsWith "(Clone)"
34 \Destroy!
35
36with item()
37 .itemFieldA = 123
38 item = x
39
40 \callMethod!\chainCall!
41
42 \callMethod!
43 \chainCall!
44 \chainCall!
45
46 switch .itemFieldB
47 \getValue!
48 when "Valid", \getItemState!
49 \itemMethodA!\getValue!
50 else
51 \itemMethodB!
52 \getValue!
53
54 a = if .itemFieldC
55 .itemFieldD
56 else
57 .itemFieldE
58
59 for v in *values
60 \itemMethodC v
61
62 unless .b
63 .c = while .itemFieldD
64 \itemNext!
65 \get!
66
67nil
diff --git a/spec/inputs/syntax.mp b/spec/inputs/syntax.mp
index f3a0a5c..4df5785 100644
--- a/spec/inputs/syntax.mp
+++ b/spec/inputs/syntax.mp
@@ -123,21 +123,6 @@ argon\world().something()
123 123
124argon\somethin"200".world(1,2) 124argon\somethin"200".world(1,2)
125 125
126origin
127 .transform
128 .root
129 .gameObject
130 \Parents!
131 \Descendants!
132 \SelectEnable!
133 \SelectVisible!
134 \TagEqual "fx"
135 \Where (x) ->
136 if x\IsTargeted!
137 return false
138 x.name\EndsWith "(Clone)"
139 \Destroy!
140
141x = -434 126x = -434
142 127
143x = -hello world one two 128x = -hello world one two