diff options
| author | Li Jin <dragon-fly@qq.com> | 2024-03-21 09:14:34 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2024-03-21 09:14:34 +0800 |
| commit | 4a3cc26c6dfd74e61c8b6480038d6a292ea86e47 (patch) | |
| tree | 9554b94cfc15e4acee0c2e60b63af16f1b828207 /spec/outputs/unicode/cond.lua | |
| parent | 80b65520da432843f0c63431a1867bd2620bc4ac (diff) | |
| download | yuescript-4a3cc26c6dfd74e61c8b6480038d6a292ea86e47.tar.gz yuescript-4a3cc26c6dfd74e61c8b6480038d6a292ea86e47.tar.bz2 yuescript-4a3cc26c6dfd74e61c8b6480038d6a292ea86e47.zip | |
remove redundant 'do' blocks in code generation.
Diffstat (limited to 'spec/outputs/unicode/cond.lua')
| -rw-r--r-- | spec/outputs/unicode/cond.lua | 68 |
1 files changed, 27 insertions, 41 deletions
diff --git a/spec/outputs/unicode/cond.lua b/spec/outputs/unicode/cond.lua index ed5d274..2b5af8a 100644 --- a/spec/outputs/unicode/cond.lua +++ b/spec/outputs/unicode/cond.lua | |||
| @@ -113,19 +113,15 @@ local z_u53d8_u91cf = false | |||
| 113 | if false then | 113 | if false then |
| 114 | __u65e0_u6548_u53d8_u91cf = _u4e00 | 114 | __u65e0_u6548_u53d8_u91cf = _u4e00 |
| 115 | else | 115 | else |
| 116 | do | 116 | local _u6761_u4ef6x = true |
| 117 | local _u6761_u4ef6x = true | 117 | if _u6761_u4ef6x then |
| 118 | if _u6761_u4ef6x then | 118 | __u65e0_u6548_u53d8_u91cf = _u4e8c |
| 119 | __u65e0_u6548_u53d8_u91cf = _u4e8c | 119 | else |
| 120 | local _u6761_u4ef6z = true | ||
| 121 | if _u6761_u4ef6z then | ||
| 122 | __u65e0_u6548_u53d8_u91cf = _u4e09 | ||
| 120 | else | 123 | else |
| 121 | do | 124 | __u65e0_u6548_u53d8_u91cf = _u56db |
| 122 | local _u6761_u4ef6z = true | ||
| 123 | if _u6761_u4ef6z then | ||
| 124 | __u65e0_u6548_u53d8_u91cf = _u4e09 | ||
| 125 | else | ||
| 126 | __u65e0_u6548_u53d8_u91cf = _u56db | ||
| 127 | end | ||
| 128 | end | ||
| 129 | end | 125 | end |
| 130 | end | 126 | end |
| 131 | end | 127 | end |
| @@ -133,35 +129,27 @@ local _u8f93_u51fa | |||
| 133 | if false then | 129 | if false then |
| 134 | _u8f93_u51fa = _u4e00 | 130 | _u8f93_u51fa = _u4e00 |
| 135 | else | 131 | else |
| 136 | do | 132 | local _u6761_u4ef6x = true |
| 137 | local _u6761_u4ef6x = true | 133 | if _u6761_u4ef6x then |
| 138 | if _u6761_u4ef6x then | 134 | _u8f93_u51fa = _u4e8c |
| 139 | _u8f93_u51fa = _u4e8c | 135 | else |
| 136 | local _u6761_u4ef6z = true | ||
| 137 | if _u6761_u4ef6z then | ||
| 138 | _u8f93_u51fa = _u4e09 | ||
| 140 | else | 139 | else |
| 141 | do | 140 | _u8f93_u51fa = _u56db |
| 142 | local _u6761_u4ef6z = true | ||
| 143 | if _u6761_u4ef6z then | ||
| 144 | _u8f93_u51fa = _u4e09 | ||
| 145 | else | ||
| 146 | _u8f93_u51fa = _u56db | ||
| 147 | end | ||
| 148 | end | ||
| 149 | end | 141 | end |
| 150 | end | 142 | end |
| 151 | end | 143 | end |
| 152 | local _u53d8_u91cf | 144 | local _u53d8_u91cf |
| 153 | _u53d8_u91cf = function() | 145 | _u53d8_u91cf = function() |
| 154 | do | 146 | local _u67d0_u4e1c_u897f = true |
| 155 | local _u67d0_u4e1c_u897f = true | 147 | if _u67d0_u4e1c_u897f then |
| 156 | if _u67d0_u4e1c_u897f then | 148 | return 1 |
| 157 | return 1 | 149 | else |
| 158 | else | 150 | local _u53e6_u4e00_u4e2a = false |
| 159 | do | 151 | if _u53e6_u4e00_u4e2a then |
| 160 | local _u53e6_u4e00_u4e2a = false | 152 | return 2 |
| 161 | if _u53e6_u4e00_u4e2a then | ||
| 162 | return 2 | ||
| 163 | end | ||
| 164 | end | ||
| 165 | end | 153 | end |
| 166 | end | 154 | end |
| 167 | end | 155 | end |
| @@ -319,12 +307,10 @@ do | |||
| 319 | end | 307 | end |
| 320 | end | 308 | end |
| 321 | do | 309 | do |
| 322 | do | 310 | local __u6a21_u5757 = { } |
| 323 | local __u6a21_u5757 = { } | 311 | if __u6a21_u5757 then |
| 324 | if __u6a21_u5757 then | 312 | local _u4e1c_u897f = __u6a21_u5757["东西"] |
| 325 | local _u4e1c_u897f = __u6a21_u5757["东西"] | 313 | local a_u529f_u80fd, b_u529f_u80fd = __u6a21_u5757["a功能"], __u6a21_u5757["b功能"] |
| 326 | local a_u529f_u80fd, b_u529f_u80fd = __u6a21_u5757["a功能"], __u6a21_u5757["b功能"] | ||
| 327 | end | ||
| 328 | end | 314 | end |
| 329 | end | 315 | end |
| 330 | do | 316 | do |
