diff options
| author | Li Jin <dragon-fly@qq.com> | 2023-08-17 10:36:15 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2023-08-17 10:36:15 +0800 |
| commit | e61cce21ef7def2c2e52dd6cb6a5b540ebcac29d (patch) | |
| tree | 6e7c5e7e6f13157e9f8db26c38f6d8cba75683e5 /spec/outputs/unicode/cond.lua | |
| parent | 289faf45ac26f7e0ac1a1e4305e5c42fc1e5b866 (diff) | |
| download | yuescript-e61cce21ef7def2c2e52dd6cb6a5b540ebcac29d.tar.gz yuescript-e61cce21ef7def2c2e52dd6cb6a5b540ebcac29d.tar.bz2 yuescript-e61cce21ef7def2c2e52dd6cb6a5b540ebcac29d.zip | |
add unicode identifier support, fix more issue from #144
Diffstat (limited to 'spec/outputs/unicode/cond.lua')
| -rw-r--r-- | spec/outputs/unicode/cond.lua | 354 |
1 files changed, 354 insertions, 0 deletions
diff --git a/spec/outputs/unicode/cond.lua b/spec/outputs/unicode/cond.lua new file mode 100644 index 0000000..f972dea --- /dev/null +++ b/spec/outputs/unicode/cond.lua | |||
| @@ -0,0 +1,354 @@ | |||
| 1 | local _u4f60_u5f88_u9177 = false | ||
| 2 | local __u65e0_u6548_u53d8_u91cf | ||
| 3 | if _u9177 then | ||
| 4 | if _u4f60_u5f88_u9177 then | ||
| 5 | __u65e0_u6548_u53d8_u91cf = _u4e00 | ||
| 6 | else | ||
| 7 | if _u5403_u4e1c_u897f then | ||
| 8 | __u65e0_u6548_u53d8_u91cf = _u597d | ||
| 9 | else | ||
| 10 | __u65e0_u6548_u53d8_u91cf = _u4e8c | ||
| 11 | __u65e0_u6548_u53d8_u91cf = _u4e09 | ||
| 12 | end | ||
| 13 | end | ||
| 14 | else | ||
| 15 | __u65e0_u6548_u53d8_u91cf = _u5426 | ||
| 16 | end | ||
| 17 | if _u9177 then | ||
| 18 | __u65e0_u6548_u53d8_u91cf = _u5426 | ||
| 19 | end | ||
| 20 | if _u9177 then | ||
| 21 | __u65e0_u6548_u53d8_u91cf = _u5426 | ||
| 22 | else | ||
| 23 | __u65e0_u6548_u53d8_u91cf = _u662f | ||
| 24 | end | ||
| 25 | if _u9177 then | ||
| 26 | _u5594(_u9177) | ||
| 27 | else | ||
| 28 | _u6ca1_u90a3_u4e48(_u9177) | ||
| 29 | end | ||
| 30 | if _u5728_u5de5_u4f5c then | ||
| 31 | if _u9177 then | ||
| 32 | if _u9177 then | ||
| 33 | __u65e0_u6548_u53d8_u91cf = _u597d_u5427 | ||
| 34 | else | ||
| 35 | __u65e0_u6548_u53d8_u91cf = _u4ec0_u4e48 | ||
| 36 | end | ||
| 37 | else | ||
| 38 | __u65e0_u6548_u53d8_u91cf = _u5450 | ||
| 39 | end | ||
| 40 | end | ||
| 41 | if _u270c_ufe0f then | ||
| 42 | _u65e0(_u65e5) | ||
| 43 | elseif _u9177(_u6211) then | ||
| 44 | _u597d_u5427(_u5440) | ||
| 45 | else | ||
| 46 | u_u578b(_u8def) | ||
| 47 | end | ||
| 48 | if _u270c_ufe0f then | ||
| 49 | _u65e0(_u7236) | ||
| 50 | else | ||
| 51 | if _u9177(_u4f60) then | ||
| 52 | _u597d_u5427(_u5427) | ||
| 53 | else | ||
| 54 | p_u578b(_u8def) | ||
| 55 | end | ||
| 56 | end | ||
| 57 | if (function() end)() then | ||
| 58 | _u968f_u4fbf(_u600e_u6837) | ||
| 59 | end | ||
| 60 | if nil then | ||
| 61 | _u7ffb_u8f6c(_u6211) | ||
| 62 | else | ||
| 63 | _u8fd9_u4e2a(_u662f, _u5f27_u5ea6) | ||
| 64 | end | ||
| 65 | if _u4e1c_u897f(_u4e0d_u9519) then | ||
| 66 | _u6ca1(_u6cd5) | ||
| 67 | elseif _u597d_u7684(_u786e_u5b9a) then | ||
| 68 | _u4ec0_u4e48(_u8fd9_u91cc) | ||
| 69 | end | ||
| 70 | if _u5f88_u591a_u4e1c_u897f then | ||
| 71 | _u6ca1(_u673a_u4f1a) | ||
| 72 | elseif _u597d_u5427 then | ||
| 73 | _u73b0_u5728(_u600e_u4e48_u529e) | ||
| 74 | end | ||
| 75 | if _u5f88_u591a_u4e1c_u897f then | ||
| 76 | _u662f(_u4f19_u8ba1) | ||
| 77 | elseif _u597d_u7684(_u4eba) then | ||
| 78 | _u55e8(_u597d_u5440) | ||
| 79 | else | ||
| 80 | _u55ef(_u786e_u5b9a) | ||
| 81 | end | ||
| 82 | if _u6211_u4eec(_u8d70_u5427) then | ||
| 83 | _u6253_u5370("打招呼") | ||
| 84 | elseif "只有我们" then | ||
| 85 | _u6253_u5370("威尔史密斯") | ||
| 86 | else | ||
| 87 | _u663e_u793a(5555555) | ||
| 88 | end | ||
| 89 | do | ||
| 90 | local _u67d0_u4e1c_u897f = 10 | ||
| 91 | if _u67d0_u4e1c_u897f then | ||
| 92 | _u6253_u5370(_u67d0_u4e1c_u897f) | ||
| 93 | else | ||
| 94 | _u6253_u5370("其它") | ||
| 95 | end | ||
| 96 | end | ||
| 97 | local _u4f60_u597d | ||
| 98 | do | ||
| 99 | local _u67d0_u4e1c_u897f = 10 | ||
| 100 | if _u67d0_u4e1c_u897f then | ||
| 101 | _u4f60_u597d = _u6253_u5370(_u67d0_u4e1c_u897f) | ||
| 102 | else | ||
| 103 | _u4f60_u597d = _u6253_u5370("其它") | ||
| 104 | end | ||
| 105 | end | ||
| 106 | _u4f60_u597d = 5 + (function() | ||
| 107 | local _u67d0_u4e1c_u897f = 10 | ||
| 108 | if _u67d0_u4e1c_u897f then | ||
| 109 | return _u6253_u5370(_u67d0_u4e1c_u897f) | ||
| 110 | end | ||
| 111 | end)() | ||
| 112 | local z_u53d8_u91cf = false | ||
| 113 | if false then | ||
| 114 | __u65e0_u6548_u53d8_u91cf = _u4e00 | ||
| 115 | else | ||
| 116 | do | ||
| 117 | local _u6761_u4ef6x = true | ||
| 118 | if _u6761_u4ef6x then | ||
| 119 | __u65e0_u6548_u53d8_u91cf = _u4e8c | ||
| 120 | else | ||
| 121 | do | ||
| 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 | ||
| 130 | end | ||
| 131 | end | ||
| 132 | local _u8f93_u51fa | ||
| 133 | if false then | ||
| 134 | _u8f93_u51fa = _u4e00 | ||
| 135 | else | ||
| 136 | do | ||
| 137 | local _u6761_u4ef6x = true | ||
| 138 | if _u6761_u4ef6x then | ||
| 139 | _u8f93_u51fa = _u4e8c | ||
| 140 | else | ||
| 141 | do | ||
| 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 | ||
| 150 | end | ||
| 151 | end | ||
| 152 | local _u53d8_u91cf | ||
| 153 | _u53d8_u91cf = function() | ||
| 154 | do | ||
| 155 | local _u67d0_u4e1c_u897f = true | ||
| 156 | if _u67d0_u4e1c_u897f then | ||
| 157 | return 1 | ||
| 158 | else | ||
| 159 | do | ||
| 160 | local _u53e6_u4e00_u4e2a = false | ||
| 161 | if _u53e6_u4e00_u4e2a then | ||
| 162 | return 2 | ||
| 163 | end | ||
| 164 | end | ||
| 165 | end | ||
| 166 | end | ||
| 167 | end | ||
| 168 | if not true then | ||
| 169 | _u6253_u5370("酷!") | ||
| 170 | end | ||
| 171 | if not (true and false) then | ||
| 172 | _u6253_u5370("酷!") | ||
| 173 | end | ||
| 174 | if not false then | ||
| 175 | _u6253_u5370("酷!") | ||
| 176 | end | ||
| 177 | if not false then | ||
| 178 | _u6253_u5370("酷!") | ||
| 179 | else | ||
| 180 | _u6253_u5370("no way!") | ||
| 181 | end | ||
| 182 | if not nil then | ||
| 183 | _u6253_u5370("hello") | ||
| 184 | else | ||
| 185 | _u6253_u5370("world") | ||
| 186 | end | ||
| 187 | local x | ||
| 188 | if not true then | ||
| 189 | x = _u6253_u5370("酷!") | ||
| 190 | end | ||
| 191 | if not (true and false) then | ||
| 192 | x = _u6253_u5370("酷!") | ||
| 193 | end | ||
| 194 | local y | ||
| 195 | if not false then | ||
| 196 | y = _u6253_u5370("酷!") | ||
| 197 | end | ||
| 198 | if not false then | ||
| 199 | y = _u6253_u5370("酷!") | ||
| 200 | else | ||
| 201 | y = _u6253_u5370("没门!") | ||
| 202 | end | ||
| 203 | local z | ||
| 204 | if not nil then | ||
| 205 | z = _u6253_u5370("你好") | ||
| 206 | else | ||
| 207 | z = _u6253_u5370("世界") | ||
| 208 | end | ||
| 209 | _u6253_u5370((function() | ||
| 210 | if not true then | ||
| 211 | return _u6253_u5370("酷!") | ||
| 212 | end | ||
| 213 | end)()) | ||
| 214 | _u6253_u5370((function() | ||
| 215 | if not (true and false) then | ||
| 216 | return _u6253_u5370("酷!") | ||
| 217 | end | ||
| 218 | end)()) | ||
| 219 | _u6253_u5370((function() | ||
| 220 | if not false then | ||
| 221 | return _u6253_u5370("酷!") | ||
| 222 | end | ||
| 223 | end)()) | ||
| 224 | _u6253_u5370((function() | ||
| 225 | if not false then | ||
| 226 | return _u6253_u5370("酷!") | ||
| 227 | else | ||
| 228 | return _u6253_u5370("没门!") | ||
| 229 | end | ||
| 230 | end)()) | ||
| 231 | _u6253_u5370((function() | ||
| 232 | if not nil then | ||
| 233 | return _u6253_u5370("你好") | ||
| 234 | else | ||
| 235 | return _u6253_u5370("世界") | ||
| 236 | end | ||
| 237 | end)()) | ||
| 238 | if not _u503c then | ||
| 239 | _u6253_u5370("你好") | ||
| 240 | end | ||
| 241 | local _u53d8_u91cfdddd | ||
| 242 | if not _u503c then | ||
| 243 | _u53d8_u91cfdddd = { | ||
| 244 | 1, | ||
| 245 | 2, | ||
| 246 | 3 | ||
| 247 | } | ||
| 248 | end | ||
| 249 | do | ||
| 250 | local j_u53d8_u91cf = 100 | ||
| 251 | j_u53d8_u91cf = _u55e8() | ||
| 252 | if not j_u53d8_u91cf then | ||
| 253 | _u9519_u8bef("不是 j变量!") | ||
| 254 | end | ||
| 255 | end | ||
| 256 | local _u53d8_u91cfa = 12 | ||
| 257 | local _u53d8_u91cfc, _u53d8_u91cfb | ||
| 258 | if _u67d0_u4e1c_u897f then | ||
| 259 | _u53d8_u91cfa, _u53d8_u91cfc, _u53d8_u91cfb = "酷", nil, nil | ||
| 260 | end | ||
| 261 | local _u53d8_u91cfj | ||
| 262 | if 1 then | ||
| 263 | if 2 then | ||
| 264 | _u53d8_u91cfj = 3 | ||
| 265 | end | ||
| 266 | else | ||
| 267 | _u53d8_u91cfj = 6 | ||
| 268 | end | ||
| 269 | local _u53d8_u91cfm | ||
| 270 | if 1 then | ||
| 271 | if 2 then | ||
| 272 | _u53d8_u91cfm = 3 | ||
| 273 | end | ||
| 274 | else | ||
| 275 | _u53d8_u91cfm = 6 | ||
| 276 | end | ||
| 277 | do | ||
| 278 | _u51fd_u6570a({ | ||
| 279 | ["字段b"] = _u5b57_u6bb5b | ||
| 280 | }) | ||
| 281 | if _u51fd_u6570a then | ||
| 282 | return { | ||
| 283 | ["字段b"] = _u5b57_u6bb5b | ||
| 284 | } | ||
| 285 | else | ||
| 286 | if _u51fd_u6570c then | ||
| 287 | return { | ||
| 288 | ["字段d"] = _u53d8_u91cfe | ||
| 289 | } | ||
| 290 | else | ||
| 291 | return { | ||
| 292 | ["字段f"] = 123 | ||
| 293 | } | ||
| 294 | end | ||
| 295 | end | ||
| 296 | end | ||
| 297 | do | ||
| 298 | _u51fd_u6570c({ | ||
| 299 | ["字段d"] = _u53d8_u91cfe | ||
| 300 | }) | ||
| 301 | if _u6761_u4ef6a then | ||
| 302 | local _u5b57_u6bb5b = _u53d8_u91cftb["字段b"] | ||
| 303 | elseif _u6761_u4ef6c then | ||
| 304 | local _u53d8_u91cfe = _u53d8_u91cftb["字段d"] | ||
| 305 | end | ||
| 306 | end | ||
| 307 | do | ||
| 308 | local _des_0 = _u6570_u5b66_u5e93 | ||
| 309 | if _des_0 then | ||
| 310 | local _u6d3e = _des_0["派"] | ||
| 311 | _u6253_u5370(_u6d3e) | ||
| 312 | end | ||
| 313 | end | ||
| 314 | do | ||
| 315 | local _u6570_u5b66_u5e93 | ||
| 316 | if _u6570_u5b66_u5e93 then | ||
| 317 | local _u6d3e = _u6570_u5b66_u5e93["派"] | ||
| 318 | _u6253_u5370(_u6d3e) | ||
| 319 | end | ||
| 320 | end | ||
| 321 | do | ||
| 322 | do | ||
| 323 | local __u6a21_u5757 = { } | ||
| 324 | if __u6a21_u5757 then | ||
| 325 | local _u4e1c_u897f = __u6a21_u5757["东西"] | ||
| 326 | local a_u529f_u80fd, b_u529f_u80fd = __u6a21_u5757["a功能"], __u6a21_u5757["b功能"] | ||
| 327 | end | ||
| 328 | end | ||
| 329 | end | ||
| 330 | do | ||
| 331 | do | ||
| 332 | local _des_0 = { } | ||
| 333 | if _des_0 then | ||
| 334 | __u6a21_u5757 = _des_0 | ||
| 335 | local _u4e1c_u897f = __u6a21_u5757["东西"] | ||
| 336 | local a_u529f_u80fd, b_u529f_u80fd | ||
| 337 | do | ||
| 338 | local _obj_0 = __u6a21_u5757 | ||
| 339 | a_u529f_u80fd, b_u529f_u80fd = _obj_0["a功能"], _obj_0["b功能"] | ||
| 340 | end | ||
| 341 | end | ||
| 342 | end | ||
| 343 | end | ||
| 344 | do | ||
| 345 | local _u53d8_u91cfv | ||
| 346 | if 1 and (function() | ||
| 347 | return 0 ~= 1 | ||
| 348 | end)() then | ||
| 349 | _u53d8_u91cfv = 1 | ||
| 350 | else | ||
| 351 | _u53d8_u91cfv = 2 | ||
| 352 | end | ||
| 353 | end | ||
| 354 | return nil | ||
