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/do.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/do.yue')
-rw-r--r-- | spec/inputs/do.yue | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/inputs/do.yue b/spec/inputs/do.yue new file mode 100644 index 0000000..2fbcbb9 --- /dev/null +++ b/spec/inputs/do.yue | |||
@@ -0,0 +1,27 @@ | |||
1 | |||
2 | do | ||
3 | print "hello" | ||
4 | print "world" | ||
5 | |||
6 | x = do | ||
7 | print "hello" | ||
8 | print "world" | ||
9 | |||
10 | y = do | ||
11 | things = "shhh" | ||
12 | -> "hello: " .. things | ||
13 | |||
14 | _ = -> if something then do "yeah" | ||
15 | |||
16 | t = { | ||
17 | y: do | ||
18 | number = 100 | ||
19 | (x) -> x + number | ||
20 | } | ||
21 | |||
22 | (y=(do | ||
23 | x = 10 + 2 | ||
24 | x), k=do | ||
25 | "nothing") -> do | ||
26 | "uhhh" | ||
27 | |||