aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2023-05-17 09:19:20 +0800
committerLi Jin <dragon-fly@qq.com>2023-05-17 09:19:20 +0800
commit78d5e6f44c06ac24aee667b5f9a9e642dcc6208d (patch)
tree78913f601c44a1d85e275a30e4a1272fee00c4cb /spec/inputs
parenta8c4737494818e6591cac2191bf3a49cbe990173 (diff)
downloadyuescript-78d5e6f44c06ac24aee667b5f9a9e642dcc6208d.tar.gz
yuescript-78d5e6f44c06ac24aee667b5f9a9e642dcc6208d.tar.bz2
yuescript-78d5e6f44c06ac24aee667b5f9a9e642dcc6208d.zip
fix issue #133.
Diffstat (limited to 'spec/inputs')
-rw-r--r--spec/inputs/export.yue6
-rw-r--r--spec/inputs/syntax.yue2
-rw-r--r--spec/inputs/try-catch.yue3
3 files changed, 8 insertions, 3 deletions
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
29 (x)<- f 29 (x)<- f
30 return x h 30 return x h
31 31
32export y = -> 32export yy = ->
33 h = 100 33 h = 100
34 k = 100 34 k = 100
35 35
@@ -84,3 +84,7 @@ export v2 = 2
84export v3 = class v4 84export v3 = class v4
85v5 = 5 85v5 = 5
86 86
87export.<"abc"> = 1
88export.<name> = "export"
89export.<call> = => {}
90export["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
214tb[] = 3 214tb[] = 3
215 215
216x = 0 216x = 0
217_ = (if ntype(v) == "fndef" then x += 1) for v in *values 217_ = (if ntype(v) == "fndef" then x + 1) for v in *values
218 218
219 219
220hello = 220hello =
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
23try tb.func! 23try tb.func!
24try tb.func() 24try tb.func()
25try (tb.func!) 25try (tb.func!)
26try (tb\func(1, 2, 3))
26 27
27try tb.func 1 28try tb.func 1
28try tb.func(1) 29try tb.func(1)
@@ -32,7 +33,7 @@ catch err
32 print err) 33 print err)
33 print "OK" 34 print "OK"
34 35
35if try func 1 36if try (func 1)
36catch err 37catch err
37 print err 38 print err
38 print "OK" 39 print "OK"