aboutsummaryrefslogtreecommitdiff
path: root/spec/inputs/unicode/operators.yue
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2023-08-17 10:36:15 +0800
committerLi Jin <dragon-fly@qq.com>2023-08-17 10:36:15 +0800
commite61cce21ef7def2c2e52dd6cb6a5b540ebcac29d (patch)
tree6e7c5e7e6f13157e9f8db26c38f6d8cba75683e5 /spec/inputs/unicode/operators.yue
parent289faf45ac26f7e0ac1a1e4305e5c42fc1e5b866 (diff)
downloadyuescript-e61cce21ef7def2c2e52dd6cb6a5b540ebcac29d.tar.gz
yuescript-e61cce21ef7def2c2e52dd6cb6a5b540ebcac29d.tar.bz2
yuescript-e61cce21ef7def2c2e52dd6cb6a5b540ebcac29d.zip
add unicode identifier support, fix more issue from #144
Diffstat (limited to 'spec/inputs/unicode/operators.yue')
-rw-r--r--spec/inputs/unicode/operators.yue70
1 files changed, 70 insertions, 0 deletions
diff --git a/spec/inputs/unicode/operators.yue b/spec/inputs/unicode/operators.yue
new file mode 100644
index 0000000..2f1184a
--- /dev/null
+++ b/spec/inputs/unicode/operators.yue
@@ -0,0 +1,70 @@
1
2-- binary ops
3数字x = 1 + 3
4
5数字y = 1 +
6 3
7
8数字z = 1 +
9 3 +
10 4
11
12--
13
14数字k = 变量b and 变量c and
15 变量g
16
17变量h = 东西 and
18 ->
19 打印 "你好 世界"
20
21-- TODO: should fail, indent still set to previous line so it thinks body is
22-- indented
23变量i = 东西 or
24 ->
25 打印 "你好 世界"
26
27变量p = 东西 and
28 ->
29打印 "你好 世界"
30
31变量s = 东西 or
32 -> and 234
33
34--
35变量u = {
36 颜色: 1 and 2 and
37 3
38 4
39 4
40}
41
42变量v = {
43 颜色: 1 and
44 ->
45 "yeah"
46 "great"
47 好的: 3 ^
482
49}
50
51-- parens
52
53变量nno = (
54 是的 + 2 )
55
56变量nn = (
57 是的 + 2
58)
59
60变量n = 你好(
61 变量b
62) ->
63
64你好 变量a,
65 (
66 是的 +
67 2
68 ) -
69 好的
70