diff options
author | Li Jin <dragon-fly@qq.com> | 2024-03-25 08:25:06 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2024-03-25 08:25:06 +0800 |
commit | 21004f1fb9b2f6129a231a6c8d99179f0d6e3edf (patch) | |
tree | d94c69b9758e0e8ff38dc5f23bc888d084846110 /spec/outputs/metatable.lua | |
parent | 4e3656da3711fd045fdf90dec7084bd4556c5b7f (diff) | |
download | yuescript-21004f1fb9b2f6129a231a6c8d99179f0d6e3edf.tar.gz yuescript-21004f1fb9b2f6129a231a6c8d99179f0d6e3edf.tar.bz2 yuescript-21004f1fb9b2f6129a231a6c8d99179f0d6e3edf.zip |
remove one more redundant 'do' block from destructuring.
Diffstat (limited to 'spec/outputs/metatable.lua')
-rw-r--r-- | spec/outputs/metatable.lua | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/spec/outputs/metatable.lua b/spec/outputs/metatable.lua index 78de433..6af10e5 100644 --- a/spec/outputs/metatable.lua +++ b/spec/outputs/metatable.lua | |||
@@ -51,15 +51,11 @@ do | |||
51 | local _obj_0, _obj_1 | 51 | local _obj_0, _obj_1 |
52 | x, _obj_0, _obj_1 = 123, a.b.c, func() | 52 | x, _obj_0, _obj_1 = 123, a.b.c, func() |
53 | new, var = _obj_0.new, _obj_0.var | 53 | new, var = _obj_0.new, _obj_0.var |
54 | do | 54 | local _obj_2 = getmetatable(_obj_0) |
55 | local _obj_2 = getmetatable(_obj_0) | 55 | close, closeA = _obj_2.__close, _obj_2.__close |
56 | close, closeA = _obj_2.__close, _obj_2.__close | ||
57 | end | ||
58 | num = _obj_1.num | 56 | num = _obj_1.num |
59 | do | 57 | local _obj_3 = getmetatable(_obj_1) |
60 | local _obj_2 = getmetatable(_obj_1) | 58 | add, sub = _obj_3.__add, _obj_3.__sub |
61 | add, sub = _obj_2.__add, _obj_2.__sub | ||
62 | end | ||
63 | end | 59 | end |
64 | setmetatable(a.b, { }) | 60 | setmetatable(a.b, { }) |
65 | x.abc = 123 | 61 | x.abc = 123 |
@@ -107,17 +103,13 @@ index = getmetatable(a).__index | |||
107 | index = getmetatable(a).__index | 103 | index = getmetatable(a).__index |
108 | do | 104 | do |
109 | local ctor, update | 105 | local ctor, update |
110 | do | 106 | local _obj_0 = getmetatable(a) |
111 | local _obj_0 = getmetatable(a) | 107 | ctor, update = _obj_0.new, _obj_0.update |
112 | ctor, update = _obj_0.new, _obj_0.update | ||
113 | end | ||
114 | end | 108 | end |
115 | do | 109 | do |
116 | local ctor, update | 110 | local ctor, update |
117 | do | 111 | local _obj_0 = getmetatable(a) |
118 | local _obj_0 = getmetatable(a) | 112 | ctor, update = _obj_0.new, _obj_0.update |
119 | ctor, update = _obj_0.new, _obj_0.update | ||
120 | end | ||
121 | end | 113 | end |
122 | local tb = { } | 114 | local tb = { } |
123 | do | 115 | do |