From 78d5e6f44c06ac24aee667b5f9a9e642dcc6208d Mon Sep 17 00:00:00 2001 From: Li Jin Date: Wed, 17 May 2023 09:19:20 +0800 Subject: fix issue #133. --- spec/inputs/export.yue | 6 +++++- spec/inputs/syntax.yue | 2 +- spec/inputs/try-catch.yue | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) (limited to 'spec/inputs') diff --git a/spec/inputs/export.yue b/spec/inputs/export.yue index 15ffbcb..66e6736 100644 --- a/spec/inputs/export.yue +++ b/spec/inputs/export.yue @@ -29,7 +29,7 @@ export cbVal = do (x)<- f return x h -export y = -> +export yy = -> h = 100 k = 100 @@ -84,3 +84,7 @@ export v2 = 2 export v3 = class v4 v5 = 5 +export.<"abc"> = 1 +export. = "export" +export. = => {} +export["a-b-c-x"] = 123 diff --git a/spec/inputs/syntax.yue b/spec/inputs/syntax.yue index 4f693d4..d60a145 100644 --- a/spec/inputs/syntax.yue +++ b/spec/inputs/syntax.yue @@ -214,7 +214,7 @@ tb[] = 2 tb[] = 3 x = 0 -_ = (if ntype(v) == "fndef" then x += 1) for v in *values +_ = (if ntype(v) == "fndef" then x + 1) for v in *values hello = diff --git a/spec/inputs/try-catch.yue b/spec/inputs/try-catch.yue index 7287c33..e38cbef 100644 --- a/spec/inputs/try-catch.yue +++ b/spec/inputs/try-catch.yue @@ -23,6 +23,7 @@ try tb.func try tb.func! try tb.func() try (tb.func!) +try (tb\func(1, 2, 3)) try tb.func 1 try tb.func(1) @@ -32,7 +33,7 @@ catch err print err) print "OK" -if try func 1 +if try (func 1) catch err print err print "OK" -- cgit v1.2.3-55-g6feb