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/bubbling.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/bubbling.mp')
| -rw-r--r-- | spec/inputs/bubbling.mp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/inputs/bubbling.mp b/spec/inputs/bubbling.mp new file mode 100644 index 0000000..23a85d4 --- /dev/null +++ b/spec/inputs/bubbling.mp | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | |||
| 2 | -- vararg bubbling | ||
| 3 | f = (...) -> #{...} | ||
| 4 | |||
| 5 | dont_bubble = -> | ||
| 6 | [x for x in ((...)-> print ...)("hello")] | ||
| 7 | |||
| 8 | k = [x for x in ((...)-> print ...)("hello")] | ||
| 9 | |||
| 10 | j = for i=1,10 | ||
| 11 | (...) -> print ... | ||
| 12 | |||
| 13 | -- bubble me | ||
| 14 | |||
| 15 | m = (...) -> | ||
| 16 | [x for x in *{...} when f(...) > 4] | ||
| 17 | |||
| 18 | _ = (...)-> | ||
| 19 | x = for i in *{...} do i | ||
| 20 | y = [x for x in *{...}] | ||
| 21 | z = [x for x in hallo when f(...) > 4] | ||
| 22 | |||
| 23 | a = for i=1,10 do ... | ||
| 24 | |||
| 25 | b = for i=1,10 | ||
| 26 | (...)-> print ... | ||
| 27 | |||
