aboutsummaryrefslogtreecommitdiff
path: root/spec/outputs/syntax.lua
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2022-07-24 22:13:08 +0800
committerLi Jin <dragon-fly@qq.com>2022-07-24 22:13:08 +0800
commit303834e1b1e6cd9cae64b66c2ae44dcd7185238f (patch)
tree519f6a1debcc5791d35e06dc5cbb1ce22f9cfd31 /spec/outputs/syntax.lua
parenteb367126bf3a4f5b0e51ccef93b7c7136bea170e (diff)
downloadyuescript-303834e1b1e6cd9cae64b66c2ae44dcd7185238f.tar.gz
yuescript-303834e1b1e6cd9cae64b66c2ae44dcd7185238f.tar.bz2
yuescript-303834e1b1e6cd9cae64b66c2ae44dcd7185238f.zip
add option --target=5.1 to generate Lua 5.1 compatible codes. add const destructure. make import item const by default.
Diffstat (limited to 'spec/outputs/syntax.lua')
-rw-r--r--spec/outputs/syntax.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/outputs/syntax.lua b/spec/outputs/syntax.lua
index 24b78c6..a4cb8e2 100644
--- a/spec/outputs/syntax.lua
+++ b/spec/outputs/syntax.lua
@@ -56,10 +56,10 @@ something("else")
56_ = something([[hey]]) * 2 56_ = something([[hey]]) * 2
57_ = something([======[hey]======]) * 2 57_ = something([======[hey]======]) * 2
58_ = something[ [======[hey]======]] * 2 58_ = something[ [======[hey]======]] * 2
59_ = something('else'), 2 59_, _ = something('else'), 2
60_ = something("else"), 2 60_, _ = something("else"), 2
61_ = something([[else]]), 2 61_, _ = something([[else]]), 2
62_ = something[ [[else]]], 2 62_, _ = something[ [[else]]], 2
63something('else', 2) 63something('else', 2)
64something("else", 2) 64something("else", 2)
65something([[else]], 2) 65something([[else]], 2)
@@ -165,7 +165,7 @@ x = #{
165 2 165 2
166 } 166 }
167} 167}
168_ = hello, world 168_, _ = hello, world
169something:hello(what)(a, b) 169something:hello(what)(a, b)
170something:hello(what) 170something:hello(what)
171something.hello:world(a, b) 171something.hello:world(a, b)