diff options
author | Li Jin <dragon-fly@qq.com> | 2024-03-19 09:12:47 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2024-03-19 09:12:47 +0800 |
commit | 8279fa0231a5f4f2d34c46863462ab7228b9a338 (patch) | |
tree | 87a341859cc1e594549f05a881f4cefc89ae8df1 /spec/outputs/vararg.lua | |
parent | afc86619d710a578dc3f2bfc2ee1d62913f9abe8 (diff) | |
download | yuescript-8279fa0231a5f4f2d34c46863462ab7228b9a338.tar.gz yuescript-8279fa0231a5f4f2d34c46863462ab7228b9a338.tar.bz2 yuescript-8279fa0231a5f4f2d34c46863462ab7228b9a338.zip |
fix anonymous function args order.
Diffstat (limited to 'spec/outputs/vararg.lua')
-rw-r--r-- | spec/outputs/vararg.lua | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/spec/outputs/vararg.lua b/spec/outputs/vararg.lua index 39becd4..27918e9 100644 --- a/spec/outputs/vararg.lua +++ b/spec/outputs/vararg.lua | |||
@@ -44,7 +44,7 @@ local _anon_func_5 = function(items, ...) | |||
44 | end | 44 | end |
45 | return _accum_0 | 45 | return _accum_0 |
46 | end | 46 | end |
47 | local _anon_func_6 = function(setmetatable, func) | 47 | local _anon_func_6 = function(func, setmetatable) |
48 | local A | 48 | local A |
49 | do | 49 | do |
50 | local _class_0 | 50 | local _class_0 |
@@ -71,7 +71,7 @@ local _anon_func_6 = function(setmetatable, func) | |||
71 | return _class_0 | 71 | return _class_0 |
72 | end | 72 | end |
73 | end | 73 | end |
74 | local _anon_func_7 = function(setmetatable, func, ...) | 74 | local _anon_func_7 = function(func, setmetatable, ...) |
75 | local A | 75 | local A |
76 | do | 76 | do |
77 | local _class_0 | 77 | local _class_0 |
@@ -176,12 +176,12 @@ local _anon_func_19 = function(func, ...) | |||
176 | return func(...) | 176 | return func(...) |
177 | end | 177 | end |
178 | end | 178 | end |
179 | local _anon_func_20 = function(x, func) | 179 | local _anon_func_20 = function(func, x) |
180 | if "abc" == x then | 180 | if "abc" == x then |
181 | return func() | 181 | return func() |
182 | end | 182 | end |
183 | end | 183 | end |
184 | local _anon_func_21 = function(x, func, ...) | 184 | local _anon_func_21 = function(func, x, ...) |
185 | if "abc" == x then | 185 | if "abc" == x then |
186 | return func(...) | 186 | return func(...) |
187 | end | 187 | end |
@@ -198,7 +198,7 @@ local _anon_func_23 = function(func, ...) | |||
198 | end | 198 | end |
199 | return nil | 199 | return nil |
200 | end | 200 | end |
201 | local _anon_func_24 = function(select, print, ...) | 201 | local _anon_func_24 = function(print, select, ...) |
202 | do | 202 | do |
203 | print(select("#", ...)) | 203 | print(select("#", ...)) |
204 | return print(...) | 204 | return print(...) |
@@ -209,7 +209,7 @@ local _anon_func_25 = function(print, ...) | |||
209 | return print(...) | 209 | return print(...) |
210 | end | 210 | end |
211 | end | 211 | end |
212 | local _anon_func_26 = function(x, tb, tb2) | 212 | local _anon_func_26 = function(tb, tb2, x) |
213 | if 1 == x then | 213 | if 1 == x then |
214 | tb.x = 123 | 214 | tb.x = 123 |
215 | return tb | 215 | return tb |
@@ -241,8 +241,8 @@ join = function(...) | |||
241 | f_listcomp(_anon_func_3(items, ...)) | 241 | f_listcomp(_anon_func_3(items, ...)) |
242 | f_listcomp(_anon_func_4(items)) | 242 | f_listcomp(_anon_func_4(items)) |
243 | f_listcomp(_anon_func_5(items, ...)) | 243 | f_listcomp(_anon_func_5(items, ...)) |
244 | f_class(_anon_func_6(setmetatable, func)) | 244 | f_class(_anon_func_6(func, setmetatable)) |
245 | f_class(_anon_func_7(setmetatable, func, ...)) | 245 | f_class(_anon_func_7(func, setmetatable, ...)) |
246 | f_tblcomp(_anon_func_8(pairs, tb)) | 246 | f_tblcomp(_anon_func_8(pairs, tb)) |
247 | f_tblcomp(_anon_func_9(pairs, tb, ...)) | 247 | f_tblcomp(_anon_func_9(pairs, tb, ...)) |
248 | f_tblcomp(_anon_func_10(items)) | 248 | f_tblcomp(_anon_func_10(items)) |
@@ -255,8 +255,8 @@ join = function(...) | |||
255 | f_if(_anon_func_17(func, ...)) | 255 | f_if(_anon_func_17(func, ...)) |
256 | f_unless(_anon_func_18(func)) | 256 | f_unless(_anon_func_18(func)) |
257 | f_unless(_anon_func_19(func, ...)) | 257 | f_unless(_anon_func_19(func, ...)) |
258 | f_switch(_anon_func_20(x, func)) | 258 | f_switch(_anon_func_20(func, x)) |
259 | f_switch(_anon_func_21(x, func, ...)) | 259 | f_switch(_anon_func_21(func, x, ...)) |
260 | f_eop(_anon_func_22(func)) | 260 | f_eop(_anon_func_22(func)) |
261 | f_eop(_anon_func_23(func, ...)) | 261 | f_eop(_anon_func_23(func, ...)) |
262 | f_colon((function() | 262 | f_colon((function() |
@@ -293,11 +293,11 @@ join = function(...) | |||
293 | fn_many_args = function() | 293 | fn_many_args = function() |
294 | return 10, nil, 20, nil, 30 | 294 | return 10, nil, 20, nil, 30 |
295 | end | 295 | end |
296 | return _anon_func_24(select, print, fn_many_args()) | 296 | return _anon_func_24(print, select, fn_many_args()) |
297 | end)(fn(true)) | 297 | end)(fn(true)) |
298 | end | 298 | end |
299 | do | 299 | do |
300 | _anon_func_25(print, _anon_func_26(x, tb, tb2)) | 300 | _anon_func_25(print, _anon_func_26(tb, tb2, x)) |
301 | end | 301 | end |
302 | do | 302 | do |
303 | _anon_func_27(print, 1, 2, _anon_func_28(cond)) | 303 | _anon_func_27(print, 1, 2, _anon_func_28(cond)) |