diff options
| author | Li Jin <dragon-fly@qq.com> | 2021-02-22 17:47:17 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2021-02-22 17:47:17 +0800 |
| commit | aaabed2ef2d0e5b97ce1e25d7590cc41de6480f3 (patch) | |
| tree | ef9ab1a4f1bf25b37f592a3c841483168502ec83 /spec | |
| parent | c44cab60b7b6cf0a36e1dd011c2fe483e8d87b38 (diff) | |
| download | yuescript-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.yue | 5 | ||||
| -rw-r--r-- | spec/inputs/syntax.yue | 4 |
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 | |||
| 56 | do | 56 | do |
| 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 | ||
| 61 | do | 62 | do |
| 62 | global * | 63 | global * |
| @@ -65,4 +66,4 @@ do | |||
| 65 | import "org.package.module-y" | 66 | import "org.package.module-y" |
| 66 | 67 | ||
| 67 | do | 68 | do |
| 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 | ||
| 197 | tb = { | ||
| 198 | do: b | ||
| 199 | do :b | ||
| 200 | } | ||
| 197 | 201 | ||
| 198 | div class: "cool" | 202 | div class: "cool" |
| 199 | 203 | ||
