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/existential.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/existential.yue')
-rw-r--r-- | spec/inputs/existential.yue | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/spec/inputs/existential.yue b/spec/inputs/existential.yue new file mode 100644 index 0000000..3055705 --- /dev/null +++ b/spec/inputs/existential.yue | |||
@@ -0,0 +1,51 @@ | |||
1 | |||
2 | f1?! | ||
3 | |||
4 | f2? "arg0",123 | ||
5 | |||
6 | x = tab?.value | ||
7 | |||
8 | print abc?["hello world"]?.xyz | ||
9 | |||
10 | if print and x? | ||
11 | print x | ||
12 | |||
13 | @?\func 998 | ||
14 | |||
15 | with abc?!\func?! | ||
16 | if \p? "abc" | ||
17 | return 123 | ||
18 | |||
19 | if {:x} = a?.if?\then?(123)? @?\function 998 | ||
20 | print x | ||
21 | |||
22 | res = b.function\do!\while?("OK")\if("def",998)\f? | ||
23 | print res | ||
24 | |||
25 | solipsism = true if mind? and not world? | ||
26 | |||
27 | speed = 0 | ||
28 | speed or= 15 | ||
29 | |||
30 | footprints = yeti or "bear" | ||
31 | |||
32 | major = 'Computer Science' | ||
33 | |||
34 | unless major? | ||
35 | signUpForClass 'Introduction to Wines' | ||
36 | |||
37 | if window? | ||
38 | environment = 'browser (probably)' | ||
39 | |||
40 | zip = lottery.drawWinner?!.address?.zipcode | ||
41 | |||
42 | len = utf8?.len or string?.len or (o) -> #o | ||
43 | |||
44 | a = tb1?\end? 123 + tb2?\then 456 | ||
45 | |||
46 | b = tb1?\end? or tb2?\then | ||
47 | |||
48 | with? io.open "test.txt", "w" | ||
49 | \write "hello" | ||
50 | \close! | ||
51 | |||