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 22
33## Unreleased
44<!-- Add all new changes here. They will be moved under a version at release -->
5+ * ` NEW ` Add postfix snippet for ` unpack `
56
67## 3.9.3
78` 2024-6-11 `
Original file line number Diff line number Diff line change @@ -220,6 +220,24 @@ register 'pairs' {
220220 end
221221}
222222
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+
223241register ' insert' {
224242 function (state , source , callback )
225243 if source .type ~= ' getglobal'
You can’t perform that action at this time.
0 commit comments