diff options
28 files changed, 336 insertions, 8 deletions
diff --git a/spec/inputs/comprehension_nested.yue b/spec/inputs/comprehension_nested.yue new file mode 100644 index 0000000..c60419d --- /dev/null +++ b/spec/inputs/comprehension_nested.yue | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | list = {1, 2, 3} | ||
| 2 | pairs = ["#{i}-#{j}" for i in *list when i % 2 == 1 for j in *list when j > i] | ||
| 3 | print table.concat pairs, "," | ||
diff --git a/spec/inputs/destructure_defaults.yue b/spec/inputs/destructure_defaults.yue new file mode 100644 index 0000000..112d4a1 --- /dev/null +++ b/spec/inputs/destructure_defaults.yue | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | t = { | ||
| 2 | a: 1 | ||
| 3 | b: | ||
| 4 | c: 3 | ||
| 5 | d: nil | ||
| 6 | } | ||
| 7 | |||
| 8 | {:a, b: {:c, :d = 4}, :e = 5} = t | ||
| 9 | print a, c, d, e | ||
diff --git a/spec/inputs/export_mixed.yue b/spec/inputs/export_mixed.yue new file mode 100644 index 0000000..5adfdd7 --- /dev/null +++ b/spec/inputs/export_mixed.yue | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | export answer = 42 | ||
| 2 | export foo = -> "bar" | ||
| 3 | export baz = "baz" | ||
diff --git a/spec/inputs/nil_coalesce_precedence.yue b/spec/inputs/nil_coalesce_precedence.yue new file mode 100644 index 0000000..4e7eabf --- /dev/null +++ b/spec/inputs/nil_coalesce_precedence.yue | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | a = nil | ||
| 2 | b = false | ||
| 3 | c = 0 | ||
| 4 | |||
| 5 | x = a ?? (b and 1) ?? (c or 2) | ||
| 6 | y = (a ?? b) and 1 or 2 | ||
| 7 | |||
| 8 | print x, y | ||
diff --git a/spec/inputs/pipe_chain_combo.yue b/spec/inputs/pipe_chain_combo.yue new file mode 100644 index 0000000..d9265e4 --- /dev/null +++ b/spec/inputs/pipe_chain_combo.yue | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | f1 = (x)-> x + 2 | ||
| 2 | f2 = (x)-> x * 3 | ||
| 3 | |||
| 4 | value = 3 | ||
| 5 | |> f1 | ||
| 6 | |> f2 | ||
| 7 | |> tostring | ||
| 8 | |||
diff --git a/spec/inputs/test/comprehension_spec.yue b/spec/inputs/test/comprehension_spec.yue new file mode 100644 index 0000000..5f24aba --- /dev/null +++ b/spec/inputs/test/comprehension_spec.yue | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | describe "comprehension", -> | ||
| 2 | it "nested with filter", -> | ||
| 3 | list = {1, 2, 3} | ||
| 4 | out = ["#{i}-#{j}" for i in *list when i % 2 == 1 for j in *list when j > i] | ||
| 5 | assert.same out, {"1-2", "1-3"} | ||
diff --git a/spec/inputs/test/destructure_spec.yue b/spec/inputs/test/destructure_spec.yue new file mode 100644 index 0000000..802774c --- /dev/null +++ b/spec/inputs/test/destructure_spec.yue | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | describe "destructure", -> | ||
| 2 | it "defaults and nested", -> | ||
| 3 | t = { a: 1, b: { c: 3 }, d: nil } | ||
| 4 | {:a, b: {:c, :d = 4}, :e = 5} = t | ||
| 5 | assert.same {a, c, d, e}, {1, 3, 4, 5} | ||
diff --git a/spec/inputs/test/format_spec.yue b/spec/inputs/test/format_spec.yue index 95f73fc..6b94540 100644 --- a/spec/inputs/test/format_spec.yue +++ b/spec/inputs/test/format_spec.yue | |||
| @@ -95,6 +95,18 @@ files = [ | |||
| 95 | "spec/inputs/unicode/syntax.yue" | 95 | "spec/inputs/unicode/syntax.yue" |
| 96 | "spec/inputs/unicode/global.yue" | 96 | "spec/inputs/unicode/global.yue" |
| 97 | "spec/inputs/unicode/plus.yue" | 97 | "spec/inputs/unicode/plus.yue" |
| 98 | "spec/inputs/pipe_chain_combo.yue" | ||
| 99 | "spec/inputs/destructure_defaults.yue" | ||
| 100 | "spec/inputs/nil_coalesce_precedence.yue" | ||
| 101 | "spec/inputs/comprehension_nested.yue" | ||
| 102 | "spec/inputs/with_scope_shadow.yue" | ||
| 103 | "spec/inputs/export_mixed.yue" | ||
| 104 | "spec/inputs/unicode/pipe_chain_combo.yue" | ||
| 105 | "spec/inputs/test/destructure_spec.yue" | ||
| 106 | "spec/inputs/test/nil_coalescing_spec.yue" | ||
| 107 | "spec/inputs/test/pipe_spec.yue" | ||
| 108 | "spec/inputs/test/try_catch_spec.yue" | ||
| 109 | "spec/inputs/test/comprehension_spec.yue" | ||
| 98 | ] | 110 | ] |
| 99 | 111 | ||
| 100 | import "yue" | 112 | import "yue" |
diff --git a/spec/inputs/test/nil_coalescing_spec.yue b/spec/inputs/test/nil_coalescing_spec.yue new file mode 100644 index 0000000..4f845b3 --- /dev/null +++ b/spec/inputs/test/nil_coalescing_spec.yue | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | describe "nil coalescing", -> | ||
| 2 | it "distinguish nil and false", -> | ||
| 3 | a = nil | ||
| 4 | b = false | ||
| 5 | c = 0 | ||
| 6 | assert.same (a ?? b), false | ||
| 7 | assert.same (a ?? c), 0 | ||
diff --git a/spec/inputs/test/pipe_spec.yue b/spec/inputs/test/pipe_spec.yue new file mode 100644 index 0000000..58d48aa --- /dev/null +++ b/spec/inputs/test/pipe_spec.yue | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | describe "pipe", -> | ||
| 2 | it "pipes through functions", -> | ||
| 3 | f = (x)-> x + 1 | ||
| 4 | g = (x)-> x * 2 | ||
| 5 | assert.same (3 |> f |> g), 8 | ||
diff --git a/spec/inputs/test/try_catch_spec.yue b/spec/inputs/test/try_catch_spec.yue new file mode 100644 index 0000000..ed8fef0 --- /dev/null +++ b/spec/inputs/test/try_catch_spec.yue | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | describe "try/catch", -> | ||
| 2 | it "catch and rethrow", -> | ||
| 3 | ok, success, err = pcall -> | ||
| 4 | try | ||
| 5 | error "boom" | ||
| 6 | catch e | ||
| 7 | _, result = try | ||
| 8 | error "wrap:" .. e\match "^.-:%d+:%s*(.*)$" | ||
| 9 | result | ||
| 10 | assert.same ok, true | ||
| 11 | assert.same success, false | ||
| 12 | assert.is_true err\match("wrap:boom") != nil | ||
diff --git a/spec/inputs/unicode/pipe_chain_combo.yue b/spec/inputs/unicode/pipe_chain_combo.yue new file mode 100644 index 0000000..8f85207 --- /dev/null +++ b/spec/inputs/unicode/pipe_chain_combo.yue | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | 加 = (x)-> x + 2 | ||
| 2 | 乘 = (x)-> x * 3 | ||
| 3 | |||
| 4 | 值 = 3 | ||
| 5 | |> 加 | ||
| 6 | |> 乘 | ||
| 7 | |> tostring | ||
| 8 | |||
diff --git a/spec/inputs/with_scope_shadow.yue b/spec/inputs/with_scope_shadow.yue new file mode 100644 index 0000000..a0d58cc --- /dev/null +++ b/spec/inputs/with_scope_shadow.yue | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | target = { | ||
| 2 | val: 1 | ||
| 3 | add: (n)=> | ||
| 4 | @val += n | ||
| 5 | @val | ||
| 6 | } | ||
| 7 | |||
| 8 | result = with target | ||
| 9 | val = 100 | ||
| 10 | add 2 | ||
| 11 | |||
| 12 | print result, target.val | ||
diff --git a/spec/outputs/comprehension_nested.lua b/spec/outputs/comprehension_nested.lua new file mode 100644 index 0000000..abd5792 --- /dev/null +++ b/spec/outputs/comprehension_nested.lua | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | local list = { | ||
| 2 | 1, | ||
| 3 | 2, | ||
| 4 | 3 | ||
| 5 | } | ||
| 6 | local pairs | ||
| 7 | do | ||
| 8 | local _accum_0 = { } | ||
| 9 | local _len_0 = 1 | ||
| 10 | for _index_0 = 1, #list do | ||
| 11 | local i = list[_index_0] | ||
| 12 | if i % 2 == 1 then | ||
| 13 | for _index_1 = 1, #list do | ||
| 14 | local j = list[_index_1] | ||
| 15 | if j > i then | ||
| 16 | _accum_0[_len_0] = tostring(i) .. "-" .. tostring(j) | ||
| 17 | _len_0 = _len_0 + 1 | ||
| 18 | end | ||
| 19 | end | ||
| 20 | end | ||
| 21 | end | ||
| 22 | pairs = _accum_0 | ||
| 23 | end | ||
| 24 | return print(table.concat(pairs, ",")) | ||
diff --git a/spec/outputs/destructure_defaults.lua b/spec/outputs/destructure_defaults.lua new file mode 100644 index 0000000..938d9b2 --- /dev/null +++ b/spec/outputs/destructure_defaults.lua | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | local t = { | ||
| 2 | a = 1, | ||
| 3 | b = { | ||
| 4 | c = 3 | ||
| 5 | }, | ||
| 6 | d = nil | ||
| 7 | } | ||
| 8 | local a, c, d, e = t.a, t.b.c, t.b.d, t.e | ||
| 9 | if d == nil then | ||
| 10 | d = 4 | ||
| 11 | end | ||
| 12 | if e == nil then | ||
| 13 | e = 5 | ||
| 14 | end | ||
| 15 | return print(a, c, d, e) | ||
diff --git a/spec/outputs/export_mixed.lua b/spec/outputs/export_mixed.lua new file mode 100644 index 0000000..35529e2 --- /dev/null +++ b/spec/outputs/export_mixed.lua | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | local _module_0 = { } | ||
| 2 | local answer = 42 | ||
| 3 | _module_0["answer"] = answer | ||
| 4 | local foo | ||
| 5 | foo = function() | ||
| 6 | return "bar" | ||
| 7 | end | ||
| 8 | _module_0["foo"] = foo | ||
| 9 | local baz = "baz" | ||
| 10 | _module_0["baz"] = baz | ||
| 11 | return _module_0 | ||
diff --git a/spec/outputs/nil_coalesce_precedence.lua b/spec/outputs/nil_coalesce_precedence.lua new file mode 100644 index 0000000..6f353ee --- /dev/null +++ b/spec/outputs/nil_coalesce_precedence.lua | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | local a = nil | ||
| 2 | local b = false | ||
| 3 | local c = 0 | ||
| 4 | local x | ||
| 5 | if a ~= nil then | ||
| 6 | x = a | ||
| 7 | else | ||
| 8 | do | ||
| 9 | local _exp_0 = (b and 1) | ||
| 10 | if _exp_0 ~= nil then | ||
| 11 | x = _exp_0 | ||
| 12 | else | ||
| 13 | x = (c or 2) | ||
| 14 | end | ||
| 15 | end | ||
| 16 | end | ||
| 17 | local y = ((function() | ||
| 18 | if a ~= nil then | ||
| 19 | return a | ||
| 20 | else | ||
| 21 | return b | ||
| 22 | end | ||
| 23 | end)()) and 1 or 2 | ||
| 24 | return print(x, y) | ||
diff --git a/spec/outputs/pipe_chain_combo.lua b/spec/outputs/pipe_chain_combo.lua new file mode 100644 index 0000000..6cf40a9 --- /dev/null +++ b/spec/outputs/pipe_chain_combo.lua | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | local f1 | ||
| 2 | f1 = function(x) | ||
| 3 | return x + 2 | ||
| 4 | end | ||
| 5 | local f2 | ||
| 6 | f2 = function(x) | ||
| 7 | return x * 3 | ||
| 8 | end | ||
| 9 | local value = print(tostring(f2(f1(3)))) | ||
diff --git a/spec/outputs/test/comprehension_spec.lua b/spec/outputs/test/comprehension_spec.lua new file mode 100644 index 0000000..a4682d5 --- /dev/null +++ b/spec/outputs/test/comprehension_spec.lua | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | return describe("comprehension", function() | ||
| 2 | return it("nested with filter", function() | ||
| 3 | local list = { | ||
| 4 | 1, | ||
| 5 | 2, | ||
| 6 | 3 | ||
| 7 | } | ||
| 8 | local out | ||
| 9 | do | ||
| 10 | local _accum_0 = { } | ||
| 11 | local _len_0 = 1 | ||
| 12 | for _index_0 = 1, #list do | ||
| 13 | local i = list[_index_0] | ||
| 14 | if i % 2 == 1 then | ||
| 15 | for _index_1 = 1, #list do | ||
| 16 | local j = list[_index_1] | ||
| 17 | if j > i then | ||
| 18 | _accum_0[_len_0] = tostring(i) .. "-" .. tostring(j) | ||
| 19 | _len_0 = _len_0 + 1 | ||
| 20 | end | ||
| 21 | end | ||
| 22 | end | ||
| 23 | end | ||
| 24 | out = _accum_0 | ||
| 25 | end | ||
| 26 | return assert.same(out, { | ||
| 27 | "1-2", | ||
| 28 | "1-3" | ||
| 29 | }) | ||
| 30 | end) | ||
| 31 | end) | ||
diff --git a/spec/outputs/test/destructure_spec.lua b/spec/outputs/test/destructure_spec.lua new file mode 100644 index 0000000..4e18b02 --- /dev/null +++ b/spec/outputs/test/destructure_spec.lua | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | return describe("destructure", function() | ||
| 2 | return it("defaults and nested", function() | ||
| 3 | local t = { | ||
| 4 | a = 1, | ||
| 5 | b = { | ||
| 6 | c = 3 | ||
| 7 | }, | ||
| 8 | d = nil | ||
| 9 | } | ||
| 10 | local a, c, d, e = t.a, t.b.c, t.b.d, t.e | ||
| 11 | if d == nil then | ||
| 12 | d = 4 | ||
| 13 | end | ||
| 14 | if e == nil then | ||
| 15 | e = 5 | ||
| 16 | end | ||
| 17 | return assert.same({ | ||
| 18 | a, | ||
| 19 | c, | ||
| 20 | d, | ||
| 21 | e | ||
| 22 | }, { | ||
| 23 | 1, | ||
| 24 | 3, | ||
| 25 | 4, | ||
| 26 | 5 | ||
| 27 | }) | ||
| 28 | end) | ||
| 29 | end) | ||
diff --git a/spec/outputs/test/format_spec.lua b/spec/outputs/test/format_spec.lua index 898fa03..74a511d 100644 --- a/spec/outputs/test/format_spec.lua +++ b/spec/outputs/test/format_spec.lua | |||
| @@ -94,7 +94,19 @@ local files = { | |||
| 94 | "spec/inputs/unicode/metatable.yue", | 94 | "spec/inputs/unicode/metatable.yue", |
| 95 | "spec/inputs/unicode/syntax.yue", | 95 | "spec/inputs/unicode/syntax.yue", |
| 96 | "spec/inputs/unicode/global.yue", | 96 | "spec/inputs/unicode/global.yue", |
| 97 | "spec/inputs/unicode/plus.yue" | 97 | "spec/inputs/unicode/plus.yue", |
| 98 | "spec/inputs/pipe_chain_combo.yue", | ||
| 99 | "spec/inputs/destructure_defaults.yue", | ||
| 100 | "spec/inputs/nil_coalesce_precedence.yue", | ||
| 101 | "spec/inputs/comprehension_nested.yue", | ||
| 102 | "spec/inputs/with_scope_shadow.yue", | ||
| 103 | "spec/inputs/export_mixed.yue", | ||
| 104 | "spec/inputs/unicode/pipe_chain_combo.yue", | ||
| 105 | "spec/inputs/test/destructure_spec.yue", | ||
| 106 | "spec/inputs/test/nil_coalescing_spec.yue", | ||
| 107 | "spec/inputs/test/pipe_spec.yue", | ||
| 108 | "spec/inputs/test/try_catch_spec.yue", | ||
| 109 | "spec/inputs/test/comprehension_spec.yue" | ||
| 98 | } | 110 | } |
| 99 | local yue = require("yue") | 111 | local yue = require("yue") |
| 100 | local rewriteLineCol | 112 | local rewriteLineCol |
diff --git a/spec/outputs/test/nil_coalescing_spec.lua b/spec/outputs/test/nil_coalescing_spec.lua new file mode 100644 index 0000000..90b2a64 --- /dev/null +++ b/spec/outputs/test/nil_coalescing_spec.lua | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | local _anon_func_0 = function(a, b) | ||
| 2 | if a ~= nil then | ||
| 3 | return a | ||
| 4 | else | ||
| 5 | return b | ||
| 6 | end | ||
| 7 | end | ||
| 8 | local _anon_func_1 = function(a, c) | ||
| 9 | if a ~= nil then | ||
| 10 | return a | ||
| 11 | else | ||
| 12 | return c | ||
| 13 | end | ||
| 14 | end | ||
| 15 | return describe("nil coalescing", function() | ||
| 16 | return it("distinguish nil and false", function() | ||
| 17 | local a = nil | ||
| 18 | local b = false | ||
| 19 | local c = 0 | ||
| 20 | assert.same((_anon_func_0(a, b)), false) | ||
| 21 | return assert.same((_anon_func_1(a, c)), 0) | ||
| 22 | end) | ||
| 23 | end) | ||
diff --git a/spec/outputs/test/pipe_spec.lua b/spec/outputs/test/pipe_spec.lua new file mode 100644 index 0000000..3d797ed --- /dev/null +++ b/spec/outputs/test/pipe_spec.lua | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | return describe("pipe", function() | ||
| 2 | return it("pipes through functions", function() | ||
| 3 | local f | ||
| 4 | f = function(x) | ||
| 5 | return x + 1 | ||
| 6 | end | ||
| 7 | local g | ||
| 8 | g = function(x) | ||
| 9 | return x * 2 | ||
| 10 | end | ||
| 11 | return assert.same((g(f(3))), 8) | ||
| 12 | end) | ||
| 13 | end) | ||
diff --git a/spec/outputs/test/try_catch_spec.lua b/spec/outputs/test/try_catch_spec.lua new file mode 100644 index 0000000..2bcfc16 --- /dev/null +++ b/spec/outputs/test/try_catch_spec.lua | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | return describe("try/catch", function() | ||
| 2 | return it("catch and rethrow", function() | ||
| 3 | local ok, success, err = pcall(function() | ||
| 4 | return xpcall(function() | ||
| 5 | return error("boom") | ||
| 6 | end, function(e) | ||
| 7 | local _, result = pcall(function() | ||
| 8 | return error("wrap:" .. e:match("^.-:%d+:%s*(.*)$")) | ||
| 9 | end) | ||
| 10 | return result | ||
| 11 | end) | ||
| 12 | end) | ||
| 13 | assert.same(ok, true) | ||
| 14 | assert.same(success, false) | ||
| 15 | return assert.is_true(err:match("wrap:boom") ~= nil) | ||
| 16 | end) | ||
| 17 | end) | ||
diff --git a/spec/outputs/unicode/pipe_chain_combo.lua b/spec/outputs/unicode/pipe_chain_combo.lua new file mode 100644 index 0000000..f48cb5b --- /dev/null +++ b/spec/outputs/unicode/pipe_chain_combo.lua | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | local _u52a0 | ||
| 2 | _u52a0 = function(x) | ||
| 3 | return x + 2 | ||
| 4 | end | ||
| 5 | local _u4e58 | ||
| 6 | _u4e58 = function(x) | ||
| 7 | return x * 3 | ||
| 8 | end | ||
| 9 | local _u503c = print(tostring(_u4e58(_u52a0(3)))) | ||
diff --git a/spec/outputs/with_scope_shadow.lua b/spec/outputs/with_scope_shadow.lua new file mode 100644 index 0000000..72abe95 --- /dev/null +++ b/spec/outputs/with_scope_shadow.lua | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | local target = { | ||
| 2 | val = 1, | ||
| 3 | add = function(self, n) | ||
| 4 | self.val = self.val + n | ||
| 5 | return self.val | ||
| 6 | end | ||
| 7 | } | ||
| 8 | local result | ||
| 9 | do | ||
| 10 | local val = 100 | ||
| 11 | add(2) | ||
| 12 | result = target | ||
| 13 | end | ||
| 14 | return print(result, target.val) | ||
diff --git a/src/yue.cpp b/src/yue.cpp index 26f581e..7e39367 100644 --- a/src/yue.cpp +++ b/src/yue.cpp | |||
| @@ -57,8 +57,8 @@ std::future<R> async(const std::function<R()>& f) { | |||
| 57 | #else | 57 | #else |
| 58 | template<class R> | 58 | template<class R> |
| 59 | std::future<R> async(const std::function<R()>& f) { | 59 | std::future<R> async(const std::function<R()>& f) { |
| 60 | // fallback: ignore stack size | 60 | // fallback: ignore stack size |
| 61 | return std::async(std::launch::async, f); | 61 | return std::async(std::launch::async, f); |
| 62 | } | 62 | } |
| 63 | #endif | 63 | #endif |
| 64 | 64 | ||
diff --git a/src/yuescript/yue_compiler.cpp b/src/yuescript/yue_compiler.cpp index c4fc952..2ed0265 100644 --- a/src/yuescript/yue_compiler.cpp +++ b/src/yuescript/yue_compiler.cpp | |||
| @@ -78,7 +78,7 @@ static std::unordered_set<std::string> Metamethods = { | |||
| 78 | "close"s // Lua 5.4 | 78 | "close"s // Lua 5.4 |
| 79 | }; | 79 | }; |
| 80 | 80 | ||
| 81 | const std::string_view version = "0.32.3"sv; | 81 | const std::string_view version = "0.32.4"sv; |
| 82 | const std::string_view extension = "yue"sv; | 82 | const std::string_view extension = "yue"sv; |
| 83 | 83 | ||
| 84 | class CompileError : public std::logic_error { | 84 | class CompileError : public std::logic_error { |
| @@ -10872,13 +10872,13 @@ private: | |||
| 10872 | } | 10872 | } |
| 10873 | BLOCK_END | 10873 | BLOCK_END |
| 10874 | if (wrapped) { | 10874 | if (wrapped) { |
| 10875 | auto expList = x->new_ptr<ExpList_t>(); | 10875 | auto expList = tryFunc->new_ptr<ExpList_t>(); |
| 10876 | expList->exprs.push_back(tryFunc); | 10876 | expList->exprs.push_back(tryFunc); |
| 10877 | auto expListAssign = x->new_ptr<ExpListAssign_t>(); | 10877 | auto expListAssign = tryFunc->new_ptr<ExpListAssign_t>(); |
| 10878 | expListAssign->expList.set(expList); | 10878 | expListAssign->expList.set(expList); |
| 10879 | auto stmt = x->new_ptr<Statement_t>(); | 10879 | auto stmt = tryFunc->new_ptr<Statement_t>(); |
| 10880 | stmt->content.set(expListAssign); | 10880 | stmt->content.set(expListAssign); |
| 10881 | auto block = x->new_ptr<Block_t>(); | 10881 | auto block = tryFunc->new_ptr<Block_t>(); |
| 10882 | block->statementOrComments.push_back(stmt); | 10882 | block->statementOrComments.push_back(stmt); |
| 10883 | tryFunc.set(block); | 10883 | tryFunc.set(block); |
| 10884 | } | 10884 | } |
