aboutsummaryrefslogtreecommitdiff
path: root/spec/outputs/codes_from_doc.lua
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2025-05-26 15:52:07 +0800
committerLi Jin <dragon-fly@qq.com>2025-05-26 15:52:07 +0800
commita9d28cb615d2bdc09d2482d5262951f2afc8d6e1 (patch)
tree0567dd183518ce5df596875b8267215ecf5a25ce /spec/outputs/codes_from_doc.lua
parent4f301523563e80e838490cc6216a16bb3b8d6122 (diff)
downloadyuescript-a9d28cb615d2bdc09d2482d5262951f2afc8d6e1.tar.gz
yuescript-a9d28cb615d2bdc09d2482d5262951f2afc8d6e1.tar.bz2
yuescript-a9d28cb615d2bdc09d2482d5262951f2afc8d6e1.zip
Added doc for `with?` syntax.
Diffstat (limited to 'spec/outputs/codes_from_doc.lua')
-rw-r--r--spec/outputs/codes_from_doc.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/outputs/codes_from_doc.lua b/spec/outputs/codes_from_doc.lua
index d857dec..55be7df 100644
--- a/spec/outputs/codes_from_doc.lua
+++ b/spec/outputs/codes_from_doc.lua
@@ -2147,6 +2147,10 @@ do
2147 _with_1["key-name"] = value 2147 _with_1["key-name"] = value
2148end 2148end
2149_with_0[#_with_0 + 1] = "abc" 2149_with_0[#_with_0 + 1] = "abc"
2150local _with_0 = obj
2151if _with_0 ~= nil then
2152 print(obj.name)
2153end
2150do 2154do
2151 local var = "hello" 2155 local var = "hello"
2152 print(var) 2156 print(var)
@@ -4363,6 +4367,10 @@ do
4363 _with_1["key-name"] = value 4367 _with_1["key-name"] = value
4364end 4368end
4365_with_0[#_with_0 + 1] = "abc" 4369_with_0[#_with_0 + 1] = "abc"
4370local _with_0 = obj
4371if _with_0 ~= nil then
4372 print(obj.name)
4373end
4366do 4374do
4367 local var = "hello" 4375 local var = "hello"
4368 print(var) 4376 print(var)