diff options
| author | Li Jin <dragon-fly@qq.com> | 2020-02-20 14:43:34 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2020-02-20 14:43:34 +0800 |
| commit | a4bbfc61a8973ad029bd7d7908bf2c24398c0715 (patch) | |
| tree | b6100b8e2ac1d4f13bc2557f90c67d4cbd6061b4 /spec | |
| parent | 3a084cfad7aa8da8d2c4b7849347b0832ef8e87e (diff) | |
| download | yuescript-a4bbfc61a8973ad029bd7d7908bf2c24398c0715.tar.gz yuescript-a4bbfc61a8973ad029bd7d7908bf2c24398c0715.tar.bz2 yuescript-a4bbfc61a8973ad029bd7d7908bf2c24398c0715.zip | |
allow value lists in for statement and in local statement to be multiline got Moonscript issue 390 fixed.
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/inputs/whitespace.moon | 39 |
1 files changed, 32 insertions, 7 deletions
diff --git a/spec/inputs/whitespace.moon b/spec/inputs/whitespace.moon index 0422443..06b8773 100644 --- a/spec/inputs/whitespace.moon +++ b/spec/inputs/whitespace.moon | |||
| @@ -99,16 +99,41 @@ c(one, two, | |||
| 99 | 99 | ||
| 100 | -- | 100 | -- |
| 101 | 101 | ||
| 102 | f = -> | 102 | v = -> |
| 103 | a, | 103 | a, |
| 104 | b, | 104 | b, |
| 105 | c | 105 | c |
| 106 | 106 | ||
| 107 | a, | 107 | v1, v2, |
| 108 | b, | 108 | v3 = -> |
| 109 | c = 1, | 109 | a; |
| 110 | 2, | 110 | b, |
| 111 | f | 111 | c |
| 112 | :abc | 112 | |
| 113 | a, b, | ||
| 114 | c, d, | ||
| 115 | e, f = 1, | ||
| 116 | f2 | ||
| 117 | :abc; | ||
| 118 | 3, | ||
| 119 | 4, | ||
| 120 | f5 abc; | ||
| 121 | 6 | ||
| 122 | |||
| 123 | for a, | ||
| 124 | b, | ||
| 125 | c in pairs tb | ||
| 126 | print a, | ||
| 127 | b, | ||
| 128 | c | ||
| 129 | |||
| 130 | for i = 1, | ||
| 131 | 10, | ||
| 132 | -1 | ||
| 133 | print i | ||
| 134 | |||
| 135 | local a, | ||
| 136 | b, | ||
| 137 | c | ||
| 113 | 138 | ||
| 114 | nil | 139 | nil |
