summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2026-01-19 18:23:33 +0800
committerLi Jin <dragon-fly@qq.com>2026-01-19 18:23:33 +0800
commit3fee6db80114e8a5c29f18ac57e7ea7c7459c91d (patch)
tree6363fbb236256c507944de7afcb4d2ef754b7bc9
parentc2235b5c8fe7c84eeef5828b8bbfe9ad7aa1ecb3 (diff)
downloadyuescript-0.32.0.tar.gz
yuescript-0.32.0.tar.bz2
yuescript-0.32.0.zip
Added more specs.v0.32.0
-rw-r--r--spec/inputs/syntax.yue9
-rw-r--r--spec/outputs/syntax.lua9
2 files changed, 18 insertions, 0 deletions
diff --git a/spec/inputs/syntax.yue b/spec/inputs/syntax.yue
index cef3e3d..8904802 100644
--- a/spec/inputs/syntax.yue
+++ b/spec/inputs/syntax.yue
@@ -487,6 +487,15 @@ do
487 -- 487 --
488 488
489do 489do
490 -- Simple one-liners
491 x = 1; y = 2
492
493 -- Short related statements
494 i += 1; j += 1
495
496 if condition
497 setup!; run!; cleanup!
498
490 a = 1; b = 2; c = a + b 499 a = 1; b = 2; c = a + b
491 print a; print b; print c 500 print a; print b; print c
492 501
diff --git a/spec/outputs/syntax.lua b/spec/outputs/syntax.lua
index d975ef7..77ecba4 100644
--- a/spec/outputs/syntax.lua
+++ b/spec/outputs/syntax.lua
@@ -442,6 +442,15 @@ do
442 end)()) 442 end)())
443end 443end
444do 444do
445 x = 1
446 y = 2
447 i = i + 1
448 j = j + 1
449 if condition then
450 setup()
451 run()
452 cleanup()
453 end
445 a = 1 454 a = 1
446 local b = 2 455 local b = 2
447 local c = a + b 456 local c = a + b