diff options
Diffstat (limited to '')
-rw-r--r-- | spec/outputs/codes_from_doc_zh.lua | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/spec/outputs/codes_from_doc_zh.lua b/spec/outputs/codes_from_doc_zh.lua index 52204b7..399f8c1 100644 --- a/spec/outputs/codes_from_doc_zh.lua +++ b/spec/outputs/codes_from_doc_zh.lua | |||
@@ -339,6 +339,14 @@ func({ | |||
339 | 2, | 339 | 2, |
340 | 3 | 340 | 3 |
341 | }) | 341 | }) |
342 | local f | ||
343 | f = function() | ||
344 | return { | ||
345 | 1, | ||
346 | 2, | ||
347 | 3 | ||
348 | } | ||
349 | end | ||
342 | local tb = { | 350 | local tb = { |
343 | name = "abc", | 351 | name = "abc", |
344 | values = { | 352 | values = { |
@@ -1220,7 +1228,7 @@ if "Robert" == name then | |||
1220 | elseif "Dan" == name or "Daniel" == name then | 1228 | elseif "Dan" == name or "Daniel" == name then |
1221 | print("你的名字是Dan") | 1229 | print("你的名字是Dan") |
1222 | else | 1230 | else |
1223 | print("我不知道你的名字") | 1231 | print("我不认识你,你的名字是" .. tostring(name)) |
1224 | end | 1232 | end |
1225 | local b = 1 | 1233 | local b = 1 |
1226 | local next_number | 1234 | local next_number |
@@ -2133,6 +2141,10 @@ do | |||
2133 | _with_1["key-name"] = value | 2141 | _with_1["key-name"] = value |
2134 | end | 2142 | end |
2135 | _with_0[#_with_0 + 1] = "abc" | 2143 | _with_0[#_with_0 + 1] = "abc" |
2144 | local _with_0 = obj | ||
2145 | if _with_0 ~= nil then | ||
2146 | print(obj.name) | ||
2147 | end | ||
2136 | do | 2148 | do |
2137 | local var = "hello" | 2149 | local var = "hello" |
2138 | print(var) | 2150 | print(var) |
@@ -2542,6 +2554,14 @@ func({ | |||
2542 | 2, | 2554 | 2, |
2543 | 3 | 2555 | 3 |
2544 | }) | 2556 | }) |
2557 | local f | ||
2558 | f = function() | ||
2559 | return { | ||
2560 | 1, | ||
2561 | 2, | ||
2562 | 3 | ||
2563 | } | ||
2564 | end | ||
2545 | local tb = { | 2565 | local tb = { |
2546 | name = "abc", | 2566 | name = "abc", |
2547 | values = { | 2567 | values = { |
@@ -3422,7 +3442,7 @@ if "Robert" == name then | |||
3422 | elseif "Dan" == name or "Daniel" == name then | 3442 | elseif "Dan" == name or "Daniel" == name then |
3423 | print("你的名字是Dan") | 3443 | print("你的名字是Dan") |
3424 | else | 3444 | else |
3425 | print("我不知道你的名字") | 3445 | print("我不认识你,你的名字是" .. tostring(name)) |
3426 | end | 3446 | end |
3427 | local b = 1 | 3447 | local b = 1 |
3428 | local next_number | 3448 | local next_number |
@@ -4335,6 +4355,10 @@ do | |||
4335 | _with_1["key-name"] = value | 4355 | _with_1["key-name"] = value |
4336 | end | 4356 | end |
4337 | _with_0[#_with_0 + 1] = "abc" | 4357 | _with_0[#_with_0 + 1] = "abc" |
4358 | local _with_0 = obj | ||
4359 | if _with_0 ~= nil then | ||
4360 | print(obj.name) | ||
4361 | end | ||
4338 | do | 4362 | do |
4339 | local var = "hello" | 4363 | local var = "hello" |
4340 | print(var) | 4364 | print(var) |