diff options
| author | Li Jin <dragon-fly@qq.com> | 2020-10-08 13:01:18 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2020-10-08 13:01:18 +0800 |
| commit | 97bbe98289fb74c7cf2d9793b80a1a27b4146045 (patch) | |
| tree | 4bee0dded55bad28f6822b6e2dd3ea5251c66ae2 /spec/inputs/existential.mp | |
| parent | 5b656d2913e4f9f0017698ec835ce4ddda1dc81f (diff) | |
| download | yuescript-97bbe98289fb74c7cf2d9793b80a1a27b4146045.tar.gz yuescript-97bbe98289fb74c7cf2d9793b80a1a27b4146045.tar.bz2 yuescript-97bbe98289fb74c7cf2d9793b80a1a27b4146045.zip | |
change file extension moonp.
Diffstat (limited to 'spec/inputs/existential.mp')
| -rw-r--r-- | spec/inputs/existential.mp | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/spec/inputs/existential.mp b/spec/inputs/existential.mp new file mode 100644 index 0000000..3055705 --- /dev/null +++ b/spec/inputs/existential.mp | |||
| @@ -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 | |||
