File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## Unreleased
4
4
<!-- Add all new changes here. They will be moved under a version at release -->
5
+ * ` NEW ` Add postfix snippet for ` unpack `
5
6
6
7
## 3.9.3
7
8
` 2024-6-11 `
Original file line number Diff line number Diff line change @@ -220,6 +220,24 @@ register 'pairs' {
220
220
end
221
221
}
222
222
223
+ register ' unpack' {
224
+ function (state , source , callback )
225
+ if source .type ~= ' getglobal'
226
+ and source .type ~= ' getfield'
227
+ and source .type ~= ' getmethod'
228
+ and source .type ~= ' getindex'
229
+ and source .type ~= ' getlocal'
230
+ and source .type ~= ' call'
231
+ and source .type ~= ' table' then
232
+ return
233
+ end
234
+ local subber = subString (state )
235
+ callback (string.format (' unpack(%s)'
236
+ , subber (source .start + 1 , source .finish )
237
+ ))
238
+ end
239
+ }
240
+
223
241
register ' insert' {
224
242
function (state , source , callback )
225
243
if source .type ~= ' getglobal'
You can’t perform that action at this time.
0 commit comments