aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2021-02-10 20:45:46 +0800
committerLi Jin <dragon-fly@qq.com>2021-02-10 20:50:54 +0800
commit90e5ee7ee432f558b3c55d79fba1fcb2a8ce502f (patch)
tree3b3dd29a627dc16448d6fa628559f65bcd405dac /spec/inputs
parentc68e11bc6d7631185749aaf0c8d89147b3ac9cc9 (diff)
downloadyuescript-90e5ee7ee432f558b3c55d79fba1fcb2a8ce502f.tar.gz
yuescript-90e5ee7ee432f558b3c55d79fba1fcb2a8ce502f.tar.bz2
yuescript-90e5ee7ee432f558b3c55d79fba1fcb2a8ce502f.zip
fix issue #38 with a better solution.
Diffstat (limited to 'spec/inputs')
-rw-r--r--spec/inputs/export.mp3
-rw-r--r--spec/inputs/syntax.mp21
-rw-r--r--spec/inputs/with.mp5
3 files changed, 29 insertions, 0 deletions
diff --git a/spec/inputs/export.mp b/spec/inputs/export.mp
index 9a494d9..085510e 100644
--- a/spec/inputs/export.mp
+++ b/spec/inputs/export.mp
@@ -43,6 +43,9 @@ export Constant = switch value
43 when "better" then 2 43 when "better" then 2
44 when "best" then 3 44 when "best" then 3
45 45
46export item = 123
47 |> func
48
46export x 49export x
47 50
48f if a then b 51f if a then b
diff --git a/spec/inputs/syntax.mp b/spec/inputs/syntax.mp
index c8ad96d..f3a0a5c 100644
--- a/spec/inputs/syntax.mp
+++ b/spec/inputs/syntax.mp
@@ -123,6 +123,21 @@ 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
126x = -434 141x = -434
127 142
128x = -hello world one two 143x = -hello world one two
@@ -163,6 +178,9 @@ something\hello(what) a,b
163something\hello what 178something\hello what
164something.hello\world a,b 179something.hello\world a,b
165something.hello\world(1,2,3) a,b 180something.hello\world(1,2,3) a,b
181something
182 .hello
183 \world(1,2,3) a,b
166 184
167 185
168x = 1232 186x = 1232
@@ -295,6 +313,9 @@ a /= func "cool"
295 313
296x.then = "hello" 314x.then = "hello"
297x.while.true = "hello" 315x.while.true = "hello"
316x
317 .while
318 .true = "hello"
298 319
299-- 320--
300 321
diff --git a/spec/inputs/with.mp b/spec/inputs/with.mp
index 704c494..d88e109 100644
--- a/spec/inputs/with.mp
+++ b/spec/inputs/with.mp
@@ -111,6 +111,11 @@ do
111 with hi 111 with hi
112 return .a, .b 112 return .a, .b
113 113
114do
115 with tb
116 .x = item
117 .field
118 \func 123
114 119
115do 120do
116 with dad 121 with dad