diff options
| author | Li Jin <dragon-fly@qq.com> | 2025-05-08 09:55:15 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2025-05-08 09:55:15 +0800 |
| commit | ff137ac73d999a5849f02706cfd52f4659b025ef (patch) | |
| tree | 9e9f74da868cec52df5c34880d3ca92a374fbccb | |
| parent | 7b23b26de96aa65cbeeb2397e168f8f1ca0dfc92 (diff) | |
| download | yuescript-ff137ac73d999a5849f02706cfd52f4659b025ef.tar.gz yuescript-ff137ac73d999a5849f02706cfd52f4659b025ef.tar.bz2 yuescript-ff137ac73d999a5849f02706cfd52f4659b025ef.zip | |
Updated doc code.
| -rw-r--r-- | spec/outputs/codes_from_doc.lua | 314 | ||||
| -rw-r--r-- | spec/outputs/codes_from_doc_zh.lua | 314 |
2 files changed, 628 insertions, 0 deletions
diff --git a/spec/outputs/codes_from_doc.lua b/spec/outputs/codes_from_doc.lua index f6d5d61..a5412ab 100644 --- a/spec/outputs/codes_from_doc.lua +++ b/spec/outputs/codes_from_doc.lua | |||
| @@ -1280,6 +1280,163 @@ if _tab_0 then | |||
| 1280 | end | 1280 | end |
| 1281 | print("Vec2 " .. tostring(x) .. ", " .. tostring(y)) | 1281 | print("Vec2 " .. tostring(x) .. ", " .. tostring(y)) |
| 1282 | end | 1282 | end |
| 1283 | local _exp_0 = tb | ||
| 1284 | local _type_0 = type(_exp_0) | ||
| 1285 | local _tab_0 = "table" == _type_0 or "userdata" == _type_0 | ||
| 1286 | local _match_0 = false | ||
| 1287 | if _tab_0 then | ||
| 1288 | if 1 == _exp_0[1] and 2 == _exp_0[2] and 3 == _exp_0[3] then | ||
| 1289 | _match_0 = true | ||
| 1290 | print("1, 2, 3") | ||
| 1291 | end | ||
| 1292 | end | ||
| 1293 | if not _match_0 then | ||
| 1294 | local _match_1 = false | ||
| 1295 | if _tab_0 then | ||
| 1296 | local b = _exp_0[2] | ||
| 1297 | if 1 == _exp_0[1] and b ~= nil and 3 == _exp_0[3] then | ||
| 1298 | _match_1 = true | ||
| 1299 | print("1, " .. tostring(b) .. ", 3") | ||
| 1300 | end | ||
| 1301 | end | ||
| 1302 | if not _match_1 then | ||
| 1303 | if _tab_0 then | ||
| 1304 | local b = _exp_0[3] | ||
| 1305 | if b == nil then | ||
| 1306 | b = 3 | ||
| 1307 | end | ||
| 1308 | if 1 == _exp_0[1] and 2 == _exp_0[2] then | ||
| 1309 | print("1, 2, " .. tostring(b)) | ||
| 1310 | end | ||
| 1311 | end | ||
| 1312 | end | ||
| 1313 | end | ||
| 1314 | local _exp_0 = tb | ||
| 1315 | local _type_0 = type(_exp_0) | ||
| 1316 | local _tab_0 = "table" == _type_0 or "userdata" == _type_0 | ||
| 1317 | local _match_0 = false | ||
| 1318 | if _tab_0 then | ||
| 1319 | local result = _exp_0.result | ||
| 1320 | if true == _exp_0.success and result ~= nil then | ||
| 1321 | _match_0 = true | ||
| 1322 | print("success", result) | ||
| 1323 | end | ||
| 1324 | end | ||
| 1325 | if not _match_0 then | ||
| 1326 | local _match_1 = false | ||
| 1327 | if _tab_0 then | ||
| 1328 | if false == _exp_0.success then | ||
| 1329 | _match_1 = true | ||
| 1330 | print("failed", result) | ||
| 1331 | end | ||
| 1332 | end | ||
| 1333 | if not _match_1 then | ||
| 1334 | print("invalid") | ||
| 1335 | end | ||
| 1336 | end | ||
| 1337 | local _exp_0 = tb | ||
| 1338 | local _type_0 = type(_exp_0) | ||
| 1339 | local _tab_0 = "table" == _type_0 or "userdata" == _type_0 | ||
| 1340 | local _match_0 = false | ||
| 1341 | if _tab_0 then | ||
| 1342 | local content | ||
| 1343 | do | ||
| 1344 | local _obj_0 = _exp_0.data | ||
| 1345 | local _type_1 = type(_obj_0) | ||
| 1346 | if "table" == _type_1 or "userdata" == _type_1 then | ||
| 1347 | content = _obj_0.content | ||
| 1348 | end | ||
| 1349 | end | ||
| 1350 | local _val_0 | ||
| 1351 | do | ||
| 1352 | local _obj_0 = _exp_0.data | ||
| 1353 | if _obj_0 ~= nil then | ||
| 1354 | _val_0 = _obj_0.type | ||
| 1355 | end | ||
| 1356 | end | ||
| 1357 | if "success" == _val_0 and content ~= nil then | ||
| 1358 | _match_0 = true | ||
| 1359 | print("success", content) | ||
| 1360 | end | ||
| 1361 | end | ||
| 1362 | if not _match_0 then | ||
| 1363 | local _match_1 = false | ||
| 1364 | if _tab_0 then | ||
| 1365 | local content | ||
| 1366 | do | ||
| 1367 | local _obj_0 = _exp_0.data | ||
| 1368 | local _type_1 = type(_obj_0) | ||
| 1369 | if "table" == _type_1 or "userdata" == _type_1 then | ||
| 1370 | content = _obj_0.content | ||
| 1371 | end | ||
| 1372 | end | ||
| 1373 | local _val_0 | ||
| 1374 | do | ||
| 1375 | local _obj_0 = _exp_0.data | ||
| 1376 | if _obj_0 ~= nil then | ||
| 1377 | _val_0 = _obj_0.type | ||
| 1378 | end | ||
| 1379 | end | ||
| 1380 | if "error" == _val_0 and content ~= nil then | ||
| 1381 | _match_1 = true | ||
| 1382 | print("failed", content) | ||
| 1383 | end | ||
| 1384 | end | ||
| 1385 | if not _match_1 then | ||
| 1386 | print("invalid") | ||
| 1387 | end | ||
| 1388 | end | ||
| 1389 | local _exp_0 = tb | ||
| 1390 | local _type_0 = type(_exp_0) | ||
| 1391 | local _tab_0 = "table" == _type_0 or "userdata" == _type_0 | ||
| 1392 | if _tab_0 then | ||
| 1393 | local fourth = _exp_0[4] | ||
| 1394 | local _val_0 | ||
| 1395 | do | ||
| 1396 | local _obj_0 = _exp_0[1] | ||
| 1397 | if _obj_0 ~= nil then | ||
| 1398 | _val_0 = _obj_0.a | ||
| 1399 | end | ||
| 1400 | end | ||
| 1401 | local _val_1 | ||
| 1402 | do | ||
| 1403 | local _obj_0 = _exp_0[1] | ||
| 1404 | if _obj_0 ~= nil then | ||
| 1405 | _val_1 = _obj_0.b | ||
| 1406 | end | ||
| 1407 | end | ||
| 1408 | local _val_2 | ||
| 1409 | do | ||
| 1410 | local _obj_0 = _exp_0[2] | ||
| 1411 | if _obj_0 ~= nil then | ||
| 1412 | _val_2 = _obj_0.a | ||
| 1413 | end | ||
| 1414 | end | ||
| 1415 | local _val_3 | ||
| 1416 | do | ||
| 1417 | local _obj_0 = _exp_0[2] | ||
| 1418 | if _obj_0 ~= nil then | ||
| 1419 | _val_3 = _obj_0.b | ||
| 1420 | end | ||
| 1421 | end | ||
| 1422 | local _val_4 | ||
| 1423 | do | ||
| 1424 | local _obj_0 = _exp_0[3] | ||
| 1425 | if _obj_0 ~= nil then | ||
| 1426 | _val_4 = _obj_0.a | ||
| 1427 | end | ||
| 1428 | end | ||
| 1429 | local _val_5 | ||
| 1430 | do | ||
| 1431 | local _obj_0 = _exp_0[3] | ||
| 1432 | if _obj_0 ~= nil then | ||
| 1433 | _val_5 = _obj_0.b | ||
| 1434 | end | ||
| 1435 | end | ||
| 1436 | if 1 == _val_0 and 2 == _val_1 and 3 == _val_2 and 4 == _val_3 and 5 == _val_4 and 6 == _val_5 and fourth ~= nil then | ||
| 1437 | print("matched", fourth) | ||
| 1438 | end | ||
| 1439 | end | ||
| 1283 | local Inventory | 1440 | local Inventory |
| 1284 | local _class_0 | 1441 | local _class_0 |
| 1285 | local _base_0 = { | 1442 | local _base_0 = { |
| @@ -3286,6 +3443,163 @@ if _tab_0 then | |||
| 3286 | end | 3443 | end |
| 3287 | print("Vec2 " .. tostring(x) .. ", " .. tostring(y)) | 3444 | print("Vec2 " .. tostring(x) .. ", " .. tostring(y)) |
| 3288 | end | 3445 | end |
| 3446 | local _exp_0 = tb | ||
| 3447 | local _type_0 = type(_exp_0) | ||
| 3448 | local _tab_0 = "table" == _type_0 or "userdata" == _type_0 | ||
| 3449 | local _match_0 = false | ||
| 3450 | if _tab_0 then | ||
| 3451 | if 1 == _exp_0[1] and 2 == _exp_0[2] and 3 == _exp_0[3] then | ||
| 3452 | _match_0 = true | ||
| 3453 | print("1, 2, 3") | ||
| 3454 | end | ||
| 3455 | end | ||
| 3456 | if not _match_0 then | ||
| 3457 | local _match_1 = false | ||
| 3458 | if _tab_0 then | ||
| 3459 | local b = _exp_0[2] | ||
| 3460 | if 1 == _exp_0[1] and b ~= nil and 3 == _exp_0[3] then | ||
| 3461 | _match_1 = true | ||
| 3462 | print("1, " .. tostring(b) .. ", 3") | ||
| 3463 | end | ||
| 3464 | end | ||
| 3465 | if not _match_1 then | ||
| 3466 | if _tab_0 then | ||
| 3467 | local b = _exp_0[3] | ||
| 3468 | if b == nil then | ||
| 3469 | b = 3 | ||
| 3470 | end | ||
| 3471 | if 1 == _exp_0[1] and 2 == _exp_0[2] then | ||
| 3472 | print("1, 2, " .. tostring(b)) | ||
| 3473 | end | ||
| 3474 | end | ||
| 3475 | end | ||
| 3476 | end | ||
| 3477 | local _exp_0 = tb | ||
| 3478 | local _type_0 = type(_exp_0) | ||
| 3479 | local _tab_0 = "table" == _type_0 or "userdata" == _type_0 | ||
| 3480 | local _match_0 = false | ||
| 3481 | if _tab_0 then | ||
| 3482 | local result = _exp_0.result | ||
| 3483 | if true == _exp_0.success and result ~= nil then | ||
| 3484 | _match_0 = true | ||
| 3485 | print("success", result) | ||
| 3486 | end | ||
| 3487 | end | ||
| 3488 | if not _match_0 then | ||
| 3489 | local _match_1 = false | ||
| 3490 | if _tab_0 then | ||
| 3491 | if false == _exp_0.success then | ||
| 3492 | _match_1 = true | ||
| 3493 | print("failed", result) | ||
| 3494 | end | ||
| 3495 | end | ||
| 3496 | if not _match_1 then | ||
| 3497 | print("invalid") | ||
| 3498 | end | ||
| 3499 | end | ||
| 3500 | local _exp_0 = tb | ||
| 3501 | local _type_0 = type(_exp_0) | ||
| 3502 | local _tab_0 = "table" == _type_0 or "userdata" == _type_0 | ||
| 3503 | local _match_0 = false | ||
| 3504 | if _tab_0 then | ||
| 3505 | local content | ||
| 3506 | do | ||
| 3507 | local _obj_0 = _exp_0.data | ||
| 3508 | local _type_1 = type(_obj_0) | ||
| 3509 | if "table" == _type_1 or "userdata" == _type_1 then | ||
| 3510 | content = _obj_0.content | ||
| 3511 | end | ||
| 3512 | end | ||
| 3513 | local _val_0 | ||
| 3514 | do | ||
| 3515 | local _obj_0 = _exp_0.data | ||
| 3516 | if _obj_0 ~= nil then | ||
| 3517 | _val_0 = _obj_0.type | ||
| 3518 | end | ||
| 3519 | end | ||
| 3520 | if "success" == _val_0 and content ~= nil then | ||
| 3521 | _match_0 = true | ||
| 3522 | print("success", content) | ||
| 3523 | end | ||
| 3524 | end | ||
| 3525 | if not _match_0 then | ||
| 3526 | local _match_1 = false | ||
| 3527 | if _tab_0 then | ||
| 3528 | local content | ||
| 3529 | do | ||
| 3530 | local _obj_0 = _exp_0.data | ||
| 3531 | local _type_1 = type(_obj_0) | ||
| 3532 | if "table" == _type_1 or "userdata" == _type_1 then | ||
| 3533 | content = _obj_0.content | ||
| 3534 | end | ||
| 3535 | end | ||
| 3536 | local _val_0 | ||
| 3537 | do | ||
| 3538 | local _obj_0 = _exp_0.data | ||
| 3539 | if _obj_0 ~= nil then | ||
| 3540 | _val_0 = _obj_0.type | ||
| 3541 | end | ||
| 3542 | end | ||
| 3543 | if "error" == _val_0 and content ~= nil then | ||
| 3544 | _match_1 = true | ||
| 3545 | print("failed", content) | ||
| 3546 | end | ||
| 3547 | end | ||
| 3548 | if not _match_1 then | ||
| 3549 | print("invalid") | ||
| 3550 | end | ||
| 3551 | end | ||
| 3552 | local _exp_0 = tb | ||
| 3553 | local _type_0 = type(_exp_0) | ||
| 3554 | local _tab_0 = "table" == _type_0 or "userdata" == _type_0 | ||
| 3555 | if _tab_0 then | ||
| 3556 | local fourth = _exp_0[4] | ||
| 3557 | local _val_0 | ||
| 3558 | do | ||
| 3559 | local _obj_0 = _exp_0[1] | ||
| 3560 | if _obj_0 ~= nil then | ||
| 3561 | _val_0 = _obj_0.a | ||
| 3562 | end | ||
| 3563 | end | ||
| 3564 | local _val_1 | ||
| 3565 | do | ||
| 3566 | local _obj_0 = _exp_0[1] | ||
| 3567 | if _obj_0 ~= nil then | ||
| 3568 | _val_1 = _obj_0.b | ||
| 3569 | end | ||
| 3570 | end | ||
| 3571 | local _val_2 | ||
| 3572 | do | ||
| 3573 | local _obj_0 = _exp_0[2] | ||
| 3574 | if _obj_0 ~= nil then | ||
| 3575 | _val_2 = _obj_0.a | ||
| 3576 | end | ||
| 3577 | end | ||
| 3578 | local _val_3 | ||
| 3579 | do | ||
| 3580 | local _obj_0 = _exp_0[2] | ||
| 3581 | if _obj_0 ~= nil then | ||
| 3582 | _val_3 = _obj_0.b | ||
| 3583 | end | ||
| 3584 | end | ||
| 3585 | local _val_4 | ||
| 3586 | do | ||
| 3587 | local _obj_0 = _exp_0[3] | ||
| 3588 | if _obj_0 ~= nil then | ||
| 3589 | _val_4 = _obj_0.a | ||
| 3590 | end | ||
| 3591 | end | ||
| 3592 | local _val_5 | ||
| 3593 | do | ||
| 3594 | local _obj_0 = _exp_0[3] | ||
| 3595 | if _obj_0 ~= nil then | ||
| 3596 | _val_5 = _obj_0.b | ||
| 3597 | end | ||
| 3598 | end | ||
| 3599 | if 1 == _val_0 and 2 == _val_1 and 3 == _val_2 and 4 == _val_3 and 5 == _val_4 and 6 == _val_5 and fourth ~= nil then | ||
| 3600 | print("matched", fourth) | ||
| 3601 | end | ||
| 3602 | end | ||
| 3289 | local Inventory | 3603 | local Inventory |
| 3290 | local _class_0 | 3604 | local _class_0 |
| 3291 | local _base_0 = { | 3605 | local _base_0 = { |
diff --git a/spec/outputs/codes_from_doc_zh.lua b/spec/outputs/codes_from_doc_zh.lua index acd41a0..d9cc4dc 100644 --- a/spec/outputs/codes_from_doc_zh.lua +++ b/spec/outputs/codes_from_doc_zh.lua | |||
| @@ -1274,6 +1274,163 @@ if _tab_0 then | |||
| 1274 | end | 1274 | end |
| 1275 | print("Vec2 " .. tostring(x) .. ", " .. tostring(y)) | 1275 | print("Vec2 " .. tostring(x) .. ", " .. tostring(y)) |
| 1276 | end | 1276 | end |
| 1277 | local _exp_0 = tb | ||
| 1278 | local _type_0 = type(_exp_0) | ||
| 1279 | local _tab_0 = "table" == _type_0 or "userdata" == _type_0 | ||
| 1280 | local _match_0 = false | ||
| 1281 | if _tab_0 then | ||
| 1282 | if 1 == _exp_0[1] and 2 == _exp_0[2] and 3 == _exp_0[3] then | ||
| 1283 | _match_0 = true | ||
| 1284 | print("1, 2, 3") | ||
| 1285 | end | ||
| 1286 | end | ||
| 1287 | if not _match_0 then | ||
| 1288 | local _match_1 = false | ||
| 1289 | if _tab_0 then | ||
| 1290 | local b = _exp_0[2] | ||
| 1291 | if 1 == _exp_0[1] and b ~= nil and 3 == _exp_0[3] then | ||
| 1292 | _match_1 = true | ||
| 1293 | print("1, " .. tostring(b) .. ", 3") | ||
| 1294 | end | ||
| 1295 | end | ||
| 1296 | if not _match_1 then | ||
| 1297 | if _tab_0 then | ||
| 1298 | local b = _exp_0[3] | ||
| 1299 | if b == nil then | ||
| 1300 | b = 3 | ||
| 1301 | end | ||
| 1302 | if 1 == _exp_0[1] and 2 == _exp_0[2] then | ||
| 1303 | print("1, 2, " .. tostring(b)) | ||
| 1304 | end | ||
| 1305 | end | ||
| 1306 | end | ||
| 1307 | end | ||
| 1308 | local _exp_0 = tb | ||
| 1309 | local _type_0 = type(_exp_0) | ||
| 1310 | local _tab_0 = "table" == _type_0 or "userdata" == _type_0 | ||
| 1311 | local _match_0 = false | ||
| 1312 | if _tab_0 then | ||
| 1313 | local result = _exp_0.result | ||
| 1314 | if true == _exp_0.success and result ~= nil then | ||
| 1315 | _match_0 = true | ||
| 1316 | print("成功", result) | ||
| 1317 | end | ||
| 1318 | end | ||
| 1319 | if not _match_0 then | ||
| 1320 | local _match_1 = false | ||
| 1321 | if _tab_0 then | ||
| 1322 | if false == _exp_0.success then | ||
| 1323 | _match_1 = true | ||
| 1324 | print("失败", result) | ||
| 1325 | end | ||
| 1326 | end | ||
| 1327 | if not _match_1 then | ||
| 1328 | print("无效值") | ||
| 1329 | end | ||
| 1330 | end | ||
| 1331 | local _exp_0 = tb | ||
| 1332 | local _type_0 = type(_exp_0) | ||
| 1333 | local _tab_0 = "table" == _type_0 or "userdata" == _type_0 | ||
| 1334 | local _match_0 = false | ||
| 1335 | if _tab_0 then | ||
| 1336 | local content | ||
| 1337 | do | ||
| 1338 | local _obj_0 = _exp_0.data | ||
| 1339 | local _type_1 = type(_obj_0) | ||
| 1340 | if "table" == _type_1 or "userdata" == _type_1 then | ||
| 1341 | content = _obj_0.content | ||
| 1342 | end | ||
| 1343 | end | ||
| 1344 | local _val_0 | ||
| 1345 | do | ||
| 1346 | local _obj_0 = _exp_0.data | ||
| 1347 | if _obj_0 ~= nil then | ||
| 1348 | _val_0 = _obj_0.type | ||
| 1349 | end | ||
| 1350 | end | ||
| 1351 | if "success" == _val_0 and content ~= nil then | ||
| 1352 | _match_0 = true | ||
| 1353 | print("成功", content) | ||
| 1354 | end | ||
| 1355 | end | ||
| 1356 | if not _match_0 then | ||
| 1357 | local _match_1 = false | ||
| 1358 | if _tab_0 then | ||
| 1359 | local content | ||
| 1360 | do | ||
| 1361 | local _obj_0 = _exp_0.data | ||
| 1362 | local _type_1 = type(_obj_0) | ||
| 1363 | if "table" == _type_1 or "userdata" == _type_1 then | ||
| 1364 | content = _obj_0.content | ||
| 1365 | end | ||
| 1366 | end | ||
| 1367 | local _val_0 | ||
| 1368 | do | ||
| 1369 | local _obj_0 = _exp_0.data | ||
| 1370 | if _obj_0 ~= nil then | ||
| 1371 | _val_0 = _obj_0.type | ||
| 1372 | end | ||
| 1373 | end | ||
| 1374 | if "error" == _val_0 and content ~= nil then | ||
| 1375 | _match_1 = true | ||
| 1376 | print("失败", content) | ||
| 1377 | end | ||
| 1378 | end | ||
| 1379 | if not _match_1 then | ||
| 1380 | print("无效值") | ||
| 1381 | end | ||
| 1382 | end | ||
| 1383 | local _exp_0 = tb | ||
| 1384 | local _type_0 = type(_exp_0) | ||
| 1385 | local _tab_0 = "table" == _type_0 or "userdata" == _type_0 | ||
| 1386 | if _tab_0 then | ||
| 1387 | local fourth = _exp_0[4] | ||
| 1388 | local _val_0 | ||
| 1389 | do | ||
| 1390 | local _obj_0 = _exp_0[1] | ||
| 1391 | if _obj_0 ~= nil then | ||
| 1392 | _val_0 = _obj_0.a | ||
| 1393 | end | ||
| 1394 | end | ||
| 1395 | local _val_1 | ||
| 1396 | do | ||
| 1397 | local _obj_0 = _exp_0[1] | ||
| 1398 | if _obj_0 ~= nil then | ||
| 1399 | _val_1 = _obj_0.b | ||
| 1400 | end | ||
| 1401 | end | ||
| 1402 | local _val_2 | ||
| 1403 | do | ||
| 1404 | local _obj_0 = _exp_0[2] | ||
| 1405 | if _obj_0 ~= nil then | ||
| 1406 | _val_2 = _obj_0.a | ||
| 1407 | end | ||
| 1408 | end | ||
| 1409 | local _val_3 | ||
| 1410 | do | ||
| 1411 | local _obj_0 = _exp_0[2] | ||
| 1412 | if _obj_0 ~= nil then | ||
| 1413 | _val_3 = _obj_0.b | ||
| 1414 | end | ||
| 1415 | end | ||
| 1416 | local _val_4 | ||
| 1417 | do | ||
| 1418 | local _obj_0 = _exp_0[3] | ||
| 1419 | if _obj_0 ~= nil then | ||
| 1420 | _val_4 = _obj_0.a | ||
| 1421 | end | ||
| 1422 | end | ||
| 1423 | local _val_5 | ||
| 1424 | do | ||
| 1425 | local _obj_0 = _exp_0[3] | ||
| 1426 | if _obj_0 ~= nil then | ||
| 1427 | _val_5 = _obj_0.b | ||
| 1428 | end | ||
| 1429 | end | ||
| 1430 | if 1 == _val_0 and 2 == _val_1 and 3 == _val_2 and 4 == _val_3 and 5 == _val_4 and 6 == _val_5 and fourth ~= nil then | ||
| 1431 | print("匹配成功", fourth) | ||
| 1432 | end | ||
| 1433 | end | ||
| 1277 | local Inventory | 1434 | local Inventory |
| 1278 | local _class_0 | 1435 | local _class_0 |
| 1279 | local _base_0 = { | 1436 | local _base_0 = { |
| @@ -3274,6 +3431,163 @@ if _tab_0 then | |||
| 3274 | end | 3431 | end |
| 3275 | print("Vec2 " .. tostring(x) .. ", " .. tostring(y)) | 3432 | print("Vec2 " .. tostring(x) .. ", " .. tostring(y)) |
| 3276 | end | 3433 | end |
| 3434 | local _exp_0 = tb | ||
| 3435 | local _type_0 = type(_exp_0) | ||
| 3436 | local _tab_0 = "table" == _type_0 or "userdata" == _type_0 | ||
| 3437 | local _match_0 = false | ||
| 3438 | if _tab_0 then | ||
| 3439 | if 1 == _exp_0[1] and 2 == _exp_0[2] and 3 == _exp_0[3] then | ||
| 3440 | _match_0 = true | ||
| 3441 | print("1, 2, 3") | ||
| 3442 | end | ||
| 3443 | end | ||
| 3444 | if not _match_0 then | ||
| 3445 | local _match_1 = false | ||
| 3446 | if _tab_0 then | ||
| 3447 | local b = _exp_0[2] | ||
| 3448 | if 1 == _exp_0[1] and b ~= nil and 3 == _exp_0[3] then | ||
| 3449 | _match_1 = true | ||
| 3450 | print("1, " .. tostring(b) .. ", 3") | ||
| 3451 | end | ||
| 3452 | end | ||
| 3453 | if not _match_1 then | ||
| 3454 | if _tab_0 then | ||
| 3455 | local b = _exp_0[3] | ||
| 3456 | if b == nil then | ||
| 3457 | b = 3 | ||
| 3458 | end | ||
| 3459 | if 1 == _exp_0[1] and 2 == _exp_0[2] then | ||
| 3460 | print("1, 2, " .. tostring(b)) | ||
| 3461 | end | ||
| 3462 | end | ||
| 3463 | end | ||
| 3464 | end | ||
| 3465 | local _exp_0 = tb | ||
| 3466 | local _type_0 = type(_exp_0) | ||
| 3467 | local _tab_0 = "table" == _type_0 or "userdata" == _type_0 | ||
| 3468 | local _match_0 = false | ||
| 3469 | if _tab_0 then | ||
| 3470 | local result = _exp_0.result | ||
| 3471 | if true == _exp_0.success and result ~= nil then | ||
| 3472 | _match_0 = true | ||
| 3473 | print("成功", result) | ||
| 3474 | end | ||
| 3475 | end | ||
| 3476 | if not _match_0 then | ||
| 3477 | local _match_1 = false | ||
| 3478 | if _tab_0 then | ||
| 3479 | if false == _exp_0.success then | ||
| 3480 | _match_1 = true | ||
| 3481 | print("失败", result) | ||
| 3482 | end | ||
| 3483 | end | ||
| 3484 | if not _match_1 then | ||
| 3485 | print("无效值") | ||
| 3486 | end | ||
| 3487 | end | ||
| 3488 | local _exp_0 = tb | ||
| 3489 | local _type_0 = type(_exp_0) | ||
| 3490 | local _tab_0 = "table" == _type_0 or "userdata" == _type_0 | ||
| 3491 | local _match_0 = false | ||
| 3492 | if _tab_0 then | ||
| 3493 | local content | ||
| 3494 | do | ||
| 3495 | local _obj_0 = _exp_0.data | ||
| 3496 | local _type_1 = type(_obj_0) | ||
| 3497 | if "table" == _type_1 or "userdata" == _type_1 then | ||
| 3498 | content = _obj_0.content | ||
| 3499 | end | ||
| 3500 | end | ||
| 3501 | local _val_0 | ||
| 3502 | do | ||
| 3503 | local _obj_0 = _exp_0.data | ||
| 3504 | if _obj_0 ~= nil then | ||
| 3505 | _val_0 = _obj_0.type | ||
| 3506 | end | ||
| 3507 | end | ||
| 3508 | if "success" == _val_0 and content ~= nil then | ||
| 3509 | _match_0 = true | ||
| 3510 | print("成功", content) | ||
| 3511 | end | ||
| 3512 | end | ||
| 3513 | if not _match_0 then | ||
| 3514 | local _match_1 = false | ||
| 3515 | if _tab_0 then | ||
| 3516 | local content | ||
| 3517 | do | ||
| 3518 | local _obj_0 = _exp_0.data | ||
| 3519 | local _type_1 = type(_obj_0) | ||
| 3520 | if "table" == _type_1 or "userdata" == _type_1 then | ||
| 3521 | content = _obj_0.content | ||
| 3522 | end | ||
| 3523 | end | ||
| 3524 | local _val_0 | ||
| 3525 | do | ||
| 3526 | local _obj_0 = _exp_0.data | ||
| 3527 | if _obj_0 ~= nil then | ||
| 3528 | _val_0 = _obj_0.type | ||
| 3529 | end | ||
| 3530 | end | ||
| 3531 | if "error" == _val_0 and content ~= nil then | ||
| 3532 | _match_1 = true | ||
| 3533 | print("失败", content) | ||
| 3534 | end | ||
| 3535 | end | ||
| 3536 | if not _match_1 then | ||
| 3537 | print("无效值") | ||
| 3538 | end | ||
| 3539 | end | ||
| 3540 | local _exp_0 = tb | ||
| 3541 | local _type_0 = type(_exp_0) | ||
| 3542 | local _tab_0 = "table" == _type_0 or "userdata" == _type_0 | ||
| 3543 | if _tab_0 then | ||
| 3544 | local fourth = _exp_0[4] | ||
| 3545 | local _val_0 | ||
| 3546 | do | ||
| 3547 | local _obj_0 = _exp_0[1] | ||
| 3548 | if _obj_0 ~= nil then | ||
| 3549 | _val_0 = _obj_0.a | ||
| 3550 | end | ||
| 3551 | end | ||
| 3552 | local _val_1 | ||
| 3553 | do | ||
| 3554 | local _obj_0 = _exp_0[1] | ||
| 3555 | if _obj_0 ~= nil then | ||
| 3556 | _val_1 = _obj_0.b | ||
| 3557 | end | ||
| 3558 | end | ||
| 3559 | local _val_2 | ||
| 3560 | do | ||
| 3561 | local _obj_0 = _exp_0[2] | ||
| 3562 | if _obj_0 ~= nil then | ||
| 3563 | _val_2 = _obj_0.a | ||
| 3564 | end | ||
| 3565 | end | ||
| 3566 | local _val_3 | ||
| 3567 | do | ||
| 3568 | local _obj_0 = _exp_0[2] | ||
| 3569 | if _obj_0 ~= nil then | ||
| 3570 | _val_3 = _obj_0.b | ||
| 3571 | end | ||
| 3572 | end | ||
| 3573 | local _val_4 | ||
| 3574 | do | ||
| 3575 | local _obj_0 = _exp_0[3] | ||
| 3576 | if _obj_0 ~= nil then | ||
| 3577 | _val_4 = _obj_0.a | ||
| 3578 | end | ||
| 3579 | end | ||
| 3580 | local _val_5 | ||
| 3581 | do | ||
| 3582 | local _obj_0 = _exp_0[3] | ||
| 3583 | if _obj_0 ~= nil then | ||
| 3584 | _val_5 = _obj_0.b | ||
| 3585 | end | ||
| 3586 | end | ||
| 3587 | if 1 == _val_0 and 2 == _val_1 and 3 == _val_2 and 4 == _val_3 and 5 == _val_4 and 6 == _val_5 and fourth ~= nil then | ||
| 3588 | print("匹配成功", fourth) | ||
| 3589 | end | ||
| 3590 | end | ||
| 3277 | local Inventory | 3591 | local Inventory |
| 3278 | local _class_0 | 3592 | local _class_0 |
| 3279 | local _base_0 = { | 3593 | local _base_0 = { |
