summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2021-02-22 17:47:17 +0800
committerLi Jin <dragon-fly@qq.com>2021-02-22 17:47:17 +0800
commitaaabed2ef2d0e5b97ce1e25d7590cc41de6480f3 (patch)
treeef9ab1a4f1bf25b37f592a3c841483168502ec83 /spec
parentc44cab60b7b6cf0a36e1dd011c2fe483e8d87b38 (diff)
downloadyuescript-aaabed2ef2d0e5b97ce1e25d7590cc41de6480f3.tar.gz
yuescript-aaabed2ef2d0e5b97ce1e25d7590cc41de6480f3.tar.bz2
yuescript-aaabed2ef2d0e5b97ce1e25d7590cc41de6480f3.zip
simplify and extend import syntax.
Diffstat (limited to 'spec')
-rw-r--r--spec/inputs/import.yue5
-rw-r--r--spec/inputs/syntax.yue4
2 files changed, 7 insertions, 2 deletions
diff --git a/spec/inputs/import.yue b/spec/inputs/import.yue
index e075404..6330bcb 100644
--- a/spec/inputs/import.yue
+++ b/spec/inputs/import.yue
@@ -56,7 +56,8 @@ do
56do 56do
57 import "player" as Player 57 import "player" as Player
58 import "lpeg" as {:C, :Ct, :Cmt} 58 import "lpeg" as {:C, :Ct, :Cmt}
59 import "export" as {Something:{umm:{ch}}} 59 import "export" as {one, two, Something:{umm:{ch}}}
60 import "export" as :Another
60 61
61do 62do
62 global * 63 global *
@@ -65,4 +66,4 @@ do
65 import "org.package.module-y" 66 import "org.package.module-y"
66 67
67do 68do
68 import "org.package.module" as {function:func, if:ifVar} 69 import "org.package.module" as function:func, if:ifVar
diff --git a/spec/inputs/syntax.yue b/spec/inputs/syntax.yue
index 4df5785..aed4144 100644
--- a/spec/inputs/syntax.yue
+++ b/spec/inputs/syntax.yue
@@ -194,6 +194,10 @@ hello =
194 function: "okay" 194 function: "okay"
195 good: 230203 195 good: 230203
196 196
197tb = {
198 do: b
199 do :b
200}
197 201
198div class: "cool" 202div class: "cool"
199 203