diff options
| author | Li Jin <dragon-fly@qq.com> | 2020-09-18 17:24:03 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2020-09-18 17:24:03 +0800 |
| commit | 5b656d2913e4f9f0017698ec835ce4ddda1dc81f (patch) | |
| tree | d5e4239aa264175b78f3c6aa72291c0c94f5055e /spec/inputs | |
| parent | 5e032607d83070ff6968a3fa3eabaf86a0ea2c2e (diff) | |
| download | yuescript-5b656d2913e4f9f0017698ec835ce4ddda1dc81f.tar.gz yuescript-5b656d2913e4f9f0017698ec835ce4ddda1dc81f.tar.bz2 yuescript-5b656d2913e4f9f0017698ec835ce4ddda1dc81f.zip | |
support inserting common expression item started with * symbol into a table block.
Diffstat (limited to 'spec/inputs')
| -rw-r--r-- | spec/inputs/tables.moon | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/inputs/tables.moon b/spec/inputs/tables.moon index 6375660..e816003 100644 --- a/spec/inputs/tables.moon +++ b/spec/inputs/tables.moon | |||
| @@ -180,5 +180,28 @@ heroine = | |||
| 180 | * attribute: "mana" | 180 | * attribute: "mana" |
| 181 | value: 100 | 181 | value: 100 |
| 182 | 182 | ||
| 183 | inventory = | ||
| 184 | equipment: | ||
| 185 | * "sword" | ||
| 186 | * "shield" | ||
| 187 | items: | ||
| 188 | * name: "potion" | ||
| 189 | count: 10 | ||
| 190 | * name: "bread" | ||
| 191 | count: 3 | ||
| 192 | |||
| 193 | items = | ||
| 194 | * func! | ||
| 195 | * with tb | ||
| 196 | .abc = 123 | ||
| 197 | * {1, 2, 3} | ||
| 198 | * f {1, 2, 3} | ||
| 199 | * f | ||
| 200 | * 1 | ||
| 201 | * 2 | ||
| 202 | * 3 | ||
| 203 | * [i for i = 1, 3] | ||
| 204 | * "#{if a then b}" | ||
| 205 | |||
| 183 | nil | 206 | nil |
| 184 | 207 | ||
