aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/docs/de/doc/language-basics/operator.md26
-rw-r--r--doc/docs/doc/language-basics/operator.md26
-rw-r--r--doc/docs/id-id/doc/language-basics/operator.md26
-rw-r--r--doc/docs/pt-br/doc/language-basics/operator.md26
-rw-r--r--doc/docs/zh/doc/language-basics/operator.md26
-rw-r--r--doc/yue-de.md14
-rw-r--r--doc/yue-en.md14
-rw-r--r--doc/yue-id-id.md14
-rw-r--r--doc/yue-pt-br.md14
-rw-r--r--doc/yue-zh.md14
10 files changed, 200 insertions, 0 deletions
diff --git a/doc/docs/de/doc/language-basics/operator.md b/doc/docs/de/doc/language-basics/operator.md
index 3be5ec8..5deec6a 100644
--- a/doc/docs/de/doc/language-basics/operator.md
+++ b/doc/docs/de/doc/language-basics/operator.md
@@ -138,6 +138,8 @@ tbA[] = ...tbB
138 138
139Du kannst Array-Tabellen oder Hash-Tabellen mit dem Spread-Operator `...` vor Ausdrücken in Tabellenliteralen zusammenführen. 139Du kannst Array-Tabellen oder Hash-Tabellen mit dem Spread-Operator `...` vor Ausdrücken in Tabellenliteralen zusammenführen.
140 140
141Wenn in ein Tabellenliteral mit geschweiften Klammern gespreadet wird (zum Beispiel `{...other}`), werden sowohl der Array-Teil als auch der Hash-Teil der Lua-Tabelle kopiert.
142
141```yuescript 143```yuescript
142parts = 144parts =
143 * "Schultern" 145 * "Schultern"
@@ -176,6 +178,30 @@ merge = {...a, ...b}
176 178
177</YueDisplay> 179</YueDisplay>
178 180
181### List-Tabellen-Spread
182
183Wenn in ein Tabellenliteral mit eckigen Klammern gespreadet wird (zum Beispiel `[...other,]`), wird nur der Array-Teil kopiert.
184
185```yuescript
186source = {1, 2, 3, name: "Yue"}
187fullCopy = {...source}
188listCopy = [...source,]
189-- fullCopy => {1, 2, 3, name: "Yue"}
190-- listCopy => [1, 2, 3]
191```
192
193<YueDisplay>
194
195```yue
196source = {1, 2, 3, name: "Yue"}
197fullCopy = {...source}
198listCopy = [...source,]
199-- fullCopy => {1, 2, 3, name: "Yue"}
200-- listCopy => [1, 2, 3]
201```
202
203</YueDisplay>
204
179## Umgekehrter Tabellenindex 205## Umgekehrter Tabellenindex
180 206
181Mit dem Operator **#** kannst du auf die letzten Elemente einer Tabelle zugreifen. 207Mit dem Operator **#** kannst du auf die letzten Elemente einer Tabelle zugreifen.
diff --git a/doc/docs/doc/language-basics/operator.md b/doc/docs/doc/language-basics/operator.md
index caeb6f4..067aa66 100644
--- a/doc/docs/doc/language-basics/operator.md
+++ b/doc/docs/doc/language-basics/operator.md
@@ -138,6 +138,8 @@ tbA[] = ...tbB
138 138
139You can concatenate array tables or hash tables using spread operator `...` before expressions in table literals. 139You can concatenate array tables or hash tables using spread operator `...` before expressions in table literals.
140 140
141When spreading into a brace table literal (for example, `{...other}`), both the array part and hash part of the Lua table are copied.
142
141```yuescript 143```yuescript
142parts = 144parts =
143 * "shoulders" 145 * "shoulders"
@@ -176,6 +178,30 @@ merge = {...a, ...b}
176 178
177</YueDisplay> 179</YueDisplay>
178 180
181### List Table Spreading
182
183When spreading into a bracket table literal (for example, `[...other,]`), only the array part is copied.
184
185```yuescript
186source = {1, 2, 3, name: "Yue"}
187fullCopy = {...source}
188listCopy = [...source,]
189-- fullCopy => {1, 2, 3, name: "Yue"}
190-- listCopy => [1, 2, 3]
191```
192
193<YueDisplay>
194
195```yue
196source = {1, 2, 3, name: "Yue"}
197fullCopy = {...source}
198listCopy = [...source,]
199-- fullCopy => {1, 2, 3, name: "Yue"}
200-- listCopy => [1, 2, 3]
201```
202
203</YueDisplay>
204
179## Table Reversed Indexing 205## Table Reversed Indexing
180 206
181You can use the **#** operator to get the last elements of a table. 207You can use the **#** operator to get the last elements of a table.
diff --git a/doc/docs/id-id/doc/language-basics/operator.md b/doc/docs/id-id/doc/language-basics/operator.md
index b2b1003..68c96e6 100644
--- a/doc/docs/id-id/doc/language-basics/operator.md
+++ b/doc/docs/id-id/doc/language-basics/operator.md
@@ -138,6 +138,8 @@ tbA[] = ...tbB
138 138
139Anda bisa menggabungkan tabel array atau tabel hash menggunakan operator spread `...` sebelum ekspresi di literal tabel. 139Anda bisa menggabungkan tabel array atau tabel hash menggunakan operator spread `...` sebelum ekspresi di literal tabel.
140 140
141Saat melakukan spread ke literal tabel dengan kurung kurawal (misalnya `{...other}`), bagian array dan bagian hash dari tabel Lua akan disalin.
142
141```yuescript 143```yuescript
142parts = 144parts =
143 * "shoulders" 145 * "shoulders"
@@ -176,6 +178,30 @@ merge = {...a, ...b}
176 178
177</YueDisplay> 179</YueDisplay>
178 180
181### Penyebaran Tabel List
182
183Saat melakukan spread ke literal tabel dengan kurung siku (misalnya `[...other,]`), hanya bagian array yang disalin.
184
185```yuescript
186source = {1, 2, 3, name: "Yue"}
187fullCopy = {...source}
188listCopy = [...source,]
189-- fullCopy => {1, 2, 3, name: "Yue"}
190-- listCopy => [1, 2, 3]
191```
192
193<YueDisplay>
194
195```yue
196source = {1, 2, 3, name: "Yue"}
197fullCopy = {...source}
198listCopy = [...source,]
199-- fullCopy => {1, 2, 3, name: "Yue"}
200-- listCopy => [1, 2, 3]
201```
202
203</YueDisplay>
204
179## Indeks Balik Tabel 205## Indeks Balik Tabel
180 206
181Anda dapat menggunakan operator **#** untuk mendapatkan elemen terakhir dari tabel. 207Anda dapat menggunakan operator **#** untuk mendapatkan elemen terakhir dari tabel.
diff --git a/doc/docs/pt-br/doc/language-basics/operator.md b/doc/docs/pt-br/doc/language-basics/operator.md
index e0c0872..976cb43 100644
--- a/doc/docs/pt-br/doc/language-basics/operator.md
+++ b/doc/docs/pt-br/doc/language-basics/operator.md
@@ -138,6 +138,8 @@ tbA[] = ...tbB
138 138
139Você pode concatenar tabelas de array ou tabelas hash usando o operador spread `...` antes de expressões em literais de tabela. 139Você pode concatenar tabelas de array ou tabelas hash usando o operador spread `...` antes de expressões em literais de tabela.
140 140
141Ao fazer spread em um literal de tabela com chaves (por exemplo, `{...other}`), tanto a parte de array quanto a parte hash da tabela Lua são copiadas.
142
141```yuescript 143```yuescript
142parts = 144parts =
143 * "shoulders" 145 * "shoulders"
@@ -176,6 +178,30 @@ merge = {...a, ...b}
176 178
177</YueDisplay> 179</YueDisplay>
178 180
181### Spread de tabela de lista
182
183Ao fazer spread em um literal de tabela com colchetes (por exemplo, `[...other,]`), apenas a parte de array é copiada.
184
185```yuescript
186source = {1, 2, 3, name: "Yue"}
187fullCopy = {...source}
188listCopy = [...source,]
189-- fullCopy => {1, 2, 3, name: "Yue"}
190-- listCopy => [1, 2, 3]
191```
192
193<YueDisplay>
194
195```yue
196source = {1, 2, 3, name: "Yue"}
197fullCopy = {...source}
198listCopy = [...source,]
199-- fullCopy => {1, 2, 3, name: "Yue"}
200-- listCopy => [1, 2, 3]
201```
202
203</YueDisplay>
204
179## Indexação reversa de tabela 205## Indexação reversa de tabela
180 206
181Você pode usar o operador **#** para obter os últimos elementos de uma tabela. 207Você pode usar o operador **#** para obter os últimos elementos de uma tabela.
diff --git a/doc/docs/zh/doc/language-basics/operator.md b/doc/docs/zh/doc/language-basics/operator.md
index fc2a49d..6e3721f 100644
--- a/doc/docs/zh/doc/language-basics/operator.md
+++ b/doc/docs/zh/doc/language-basics/operator.md
@@ -138,6 +138,8 @@ tbA[] = ...tbB
138 138
139&emsp;&emsp;你可以使用前置 `...` 操作符在 Lua 表中插入数组表或哈希表。 139&emsp;&emsp;你可以使用前置 `...` 操作符在 Lua 表中插入数组表或哈希表。
140 140
141&emsp;&emsp;使用花括号字面量做表扩展(例如 `{...other}`)时,会复制 Lua 表中的数组部分和哈希部分。
142
141```yuescript 143```yuescript
142parts = 144parts =
143 * "shoulders" 145 * "shoulders"
@@ -176,6 +178,30 @@ merge = {...a, ...b}
176 178
177</YueDisplay> 179</YueDisplay>
178 180
181### 列表表扩展
182
183&emsp;&emsp;使用中括号字面量做表扩展(例如 `[...other,]`)时,只会复制 Lua 表中的数组部分。
184
185```yuescript
186source = {1, 2, 3, name: "Yue"}
187fullCopy = {...source}
188listCopy = [...source,]
189-- fullCopy => {1, 2, 3, name: "Yue"}
190-- listCopy => [1, 2, 3]
191```
192
193<YueDisplay>
194
195```yue
196source = {1, 2, 3, name: "Yue"}
197fullCopy = {...source}
198listCopy = [...source,]
199-- fullCopy => {1, 2, 3, name: "Yue"}
200-- listCopy => [1, 2, 3]
201```
202
203</YueDisplay>
204
179## 表反向索引 205## 表反向索引
180 206
181&emsp;&emsp;你可以使用 **#** 操作符来反向索引表中的元素。 207&emsp;&emsp;你可以使用 **#** 操作符来反向索引表中的元素。
diff --git a/doc/yue-de.md b/doc/yue-de.md
index aeaabf1..f0979e0 100644
--- a/doc/yue-de.md
+++ b/doc/yue-de.md
@@ -2217,6 +2217,8 @@ tbA[] = ...tbB
2217 2217
2218Du kannst Array-Tabellen oder Hash-Tabellen mit dem Spread-Operator `...` vor Ausdrücken in Tabellenliteralen zusammenführen. 2218Du kannst Array-Tabellen oder Hash-Tabellen mit dem Spread-Operator `...` vor Ausdrücken in Tabellenliteralen zusammenführen.
2219 2219
2220Wenn in ein Tabellenliteral mit geschweiften Klammern gespreadet wird (zum Beispiel `{...other}`), werden sowohl der Array-Teil als auch der Hash-Teil der Lua-Tabelle kopiert.
2221
2220```yuescript 2222```yuescript
2221parts = 2223parts =
2222 * "Schultern" 2224 * "Schultern"
@@ -2234,6 +2236,18 @@ b = {4, 5, y: 1}
2234merge = {...a, ...b} 2236merge = {...a, ...b}
2235``` 2237```
2236 2238
2239### List-Tabellen-Spread
2240
2241Wenn in ein Tabellenliteral mit eckigen Klammern gespreadet wird (zum Beispiel `[...other,]`), wird nur der Array-Teil kopiert.
2242
2243```yuescript
2244source = {1, 2, 3, name: "Yue"}
2245fullCopy = {...source}
2246listCopy = [...source,]
2247-- fullCopy => {1, 2, 3, name: "Yue"}
2248-- listCopy => [1, 2, 3]
2249```
2250
2237## Umgekehrter Tabellenindex 2251## Umgekehrter Tabellenindex
2238 2252
2239Mit dem Operator **#** kannst du auf die letzten Elemente einer Tabelle zugreifen. 2253Mit dem Operator **#** kannst du auf die letzten Elemente einer Tabelle zugreifen.
diff --git a/doc/yue-en.md b/doc/yue-en.md
index 2cac78a..6680281 100644
--- a/doc/yue-en.md
+++ b/doc/yue-en.md
@@ -2219,6 +2219,8 @@ tbA[] = ...tbB
2219 2219
2220You can concatenate array tables or hash tables using spread operator `...` before expressions in table literals. 2220You can concatenate array tables or hash tables using spread operator `...` before expressions in table literals.
2221 2221
2222When spreading into a brace table literal (for example, `{...other}`), both the array part and hash part of the Lua table are copied.
2223
2222```yuescript 2224```yuescript
2223parts = 2225parts =
2224 * "shoulders" 2226 * "shoulders"
@@ -2236,6 +2238,18 @@ b = {4, 5, y: 1}
2236merge = {...a, ...b} 2238merge = {...a, ...b}
2237``` 2239```
2238 2240
2241### List Table Spreading
2242
2243When spreading into a bracket table literal (for example, `[...other,]`), only the array part is copied.
2244
2245```yuescript
2246source = {1, 2, 3, name: "Yue"}
2247fullCopy = {...source}
2248listCopy = [...source,]
2249-- fullCopy => {1, 2, 3, name: "Yue"}
2250-- listCopy => [1, 2, 3]
2251```
2252
2239## Table Reversed Indexing 2253## Table Reversed Indexing
2240 2254
2241You can use the **#** operator to get the last elements of a table. 2255You can use the **#** operator to get the last elements of a table.
diff --git a/doc/yue-id-id.md b/doc/yue-id-id.md
index 73bf1bb..863e187 100644
--- a/doc/yue-id-id.md
+++ b/doc/yue-id-id.md
@@ -2215,6 +2215,8 @@ tbA[] = ...tbB
2215 2215
2216Anda bisa menggabungkan tabel array atau tabel hash menggunakan operator spread `...` sebelum ekspresi di literal tabel. 2216Anda bisa menggabungkan tabel array atau tabel hash menggunakan operator spread `...` sebelum ekspresi di literal tabel.
2217 2217
2218Saat melakukan spread ke literal tabel dengan kurung kurawal (misalnya `{...other}`), bagian array dan bagian hash dari tabel Lua akan disalin.
2219
2218```yuescript 2220```yuescript
2219parts = 2221parts =
2220 * "shoulders" 2222 * "shoulders"
@@ -2232,6 +2234,18 @@ b = {4, 5, y: 1}
2232merge = {...a, ...b} 2234merge = {...a, ...b}
2233``` 2235```
2234 2236
2237### Penyebaran Tabel List
2238
2239Saat melakukan spread ke literal tabel dengan kurung siku (misalnya `[...other,]`), hanya bagian array yang disalin.
2240
2241```yuescript
2242source = {1, 2, 3, name: "Yue"}
2243fullCopy = {...source}
2244listCopy = [...source,]
2245-- fullCopy => {1, 2, 3, name: "Yue"}
2246-- listCopy => [1, 2, 3]
2247```
2248
2235## Indeks Balik Tabel 2249## Indeks Balik Tabel
2236 2250
2237Anda dapat menggunakan operator **#** untuk mendapatkan elemen terakhir dari tabel. 2251Anda dapat menggunakan operator **#** untuk mendapatkan elemen terakhir dari tabel.
diff --git a/doc/yue-pt-br.md b/doc/yue-pt-br.md
index d48c19b..a1408c2 100644
--- a/doc/yue-pt-br.md
+++ b/doc/yue-pt-br.md
@@ -2217,6 +2217,8 @@ tbA[] = ...tbB
2217 2217
2218Você pode concatenar tabelas de array ou tabelas hash usando o operador spread `...` antes de expressões em literais de tabela. 2218Você pode concatenar tabelas de array ou tabelas hash usando o operador spread `...` antes de expressões em literais de tabela.
2219 2219
2220Ao fazer spread em um literal de tabela com chaves (por exemplo, `{...other}`), tanto a parte de array quanto a parte hash da tabela Lua são copiadas.
2221
2220```yuescript 2222```yuescript
2221parts = 2223parts =
2222 * "shoulders" 2224 * "shoulders"
@@ -2234,6 +2236,18 @@ b = {4, 5, y: 1}
2234merge = {...a, ...b} 2236merge = {...a, ...b}
2235``` 2237```
2236 2238
2239### Spread de tabela de lista
2240
2241Ao fazer spread em um literal de tabela com colchetes (por exemplo, `[...other,]`), apenas a parte de array é copiada.
2242
2243```yuescript
2244source = {1, 2, 3, name: "Yue"}
2245fullCopy = {...source}
2246listCopy = [...source,]
2247-- fullCopy => {1, 2, 3, name: "Yue"}
2248-- listCopy => [1, 2, 3]
2249```
2250
2237## Indexação reversa de tabela 2251## Indexação reversa de tabela
2238 2252
2239Você pode usar o operador **#** para obter os últimos elementos de uma tabela. 2253Você pode usar o operador **#** para obter os últimos elementos de uma tabela.
diff --git a/doc/yue-zh.md b/doc/yue-zh.md
index dfc5996..ac7e4b2 100644
--- a/doc/yue-zh.md
+++ b/doc/yue-zh.md
@@ -2207,6 +2207,8 @@ tbA[] = ...tbB
2207 2207
2208&emsp;&emsp;你可以使用前置 `...` 操作符在 Lua 表中插入数组表或哈希表。 2208&emsp;&emsp;你可以使用前置 `...` 操作符在 Lua 表中插入数组表或哈希表。
2209 2209
2210&emsp;&emsp;使用花括号字面量做表扩展(例如 `{...other}`)时,会复制 Lua 表中的数组部分和哈希部分。
2211
2210```yuescript 2212```yuescript
2211parts = 2213parts =
2212 * "shoulders" 2214 * "shoulders"
@@ -2224,6 +2226,18 @@ b = {4, 5, y: 1}
2224merge = {...a, ...b} 2226merge = {...a, ...b}
2225``` 2227```
2226 2228
2229### 列表表扩展
2230
2231&emsp;&emsp;使用中括号字面量做表扩展(例如 `[...other,]`)时,只会复制 Lua 表中的数组部分。
2232
2233```yuescript
2234source = {1, 2, 3, name: "Yue"}
2235fullCopy = {...source}
2236listCopy = [...source,]
2237-- fullCopy => {1, 2, 3, name: "Yue"}
2238-- listCopy => [1, 2, 3]
2239```
2240
2227## 表反向索引 2241## 表反向索引
2228 2242
2229&emsp;&emsp;你可以使用 **#** 操作符来反向索引表中的元素。 2243&emsp;&emsp;你可以使用 **#** 操作符来反向索引表中的元素。