Skip to content

Commit 4374b3b

Browse files
authored
Merge pull request #312 from stasm/zeroeight-part5
Syntax 0.8, part 5: Update reference fixtures
2 parents 67bca4b + 2044437 commit 4374b3b

21 files changed

+218
-46
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# ↓ BEL, U+0007
2+
control0 = abcdef
3+
4+
# ↓ DEL, U+007F
5+
delete = abcdef
6+
7+
# ↓ BPM, U+0082
8+
control1 = abc‚def
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"type": "Resource",
3+
"body": [
4+
{
5+
"type": "Message",
6+
"id": {
7+
"type": "Identifier",
8+
"name": "control0"
9+
},
10+
"value": {
11+
"type": "Pattern",
12+
"elements": [
13+
{
14+
"type": "TextElement",
15+
"value": "abc\u0007def"
16+
}
17+
]
18+
},
19+
"attributes": [],
20+
"comment": {
21+
"type": "Comment",
22+
"content": " ↓ BEL, U+0007"
23+
}
24+
},
25+
{
26+
"type": "Message",
27+
"id": {
28+
"type": "Identifier",
29+
"name": "delete"
30+
},
31+
"value": {
32+
"type": "Pattern",
33+
"elements": [
34+
{
35+
"type": "TextElement",
36+
"value": "abcdef"
37+
}
38+
]
39+
},
40+
"attributes": [],
41+
"comment": {
42+
"type": "Comment",
43+
"content": " ↓ DEL, U+007F"
44+
}
45+
},
46+
{
47+
"type": "Message",
48+
"id": {
49+
"type": "Identifier",
50+
"name": "control1"
51+
},
52+
"value": {
53+
"type": "Pattern",
54+
"elements": [
55+
{
56+
"type": "TextElement",
57+
"value": "abc‚def"
58+
}
59+
]
60+
},
61+
"attributes": [],
62+
"comment": {
63+
"type": "Comment",
64+
"content": " ↓ BPM, U+0082"
65+
}
66+
}
67+
]
68+
}

fluent-syntax/test/fixtures_reference/astral.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154
{
155155
"type": "Junk",
156156
"annotations": [],
157-
"content": "err-😂 = Value\n"
157+
"content": "err-😂 = Value\n\n"
158158
},
159159
{
160160
"type": "Comment",
@@ -163,7 +163,7 @@
163163
{
164164
"type": "Junk",
165165
"annotations": [],
166-
"content": "err-invalid-expression = { 😂 }\n"
166+
"content": "err-invalid-expression = { 😂 }\n\n"
167167
},
168168
{
169169
"type": "Comment",

fluent-syntax/test/fixtures_reference/call_expressions.json

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
{
7171
"type": "Junk",
7272
"annotations": [],
73-
"content": "mixed-case-callee = {Function()}\n"
73+
"content": "mixed-case-callee = {Function()}\n\n"
7474
},
7575
{
7676
"type": "Comment",
@@ -88,7 +88,7 @@
8888
{
8989
"type": "Junk",
9090
"annotations": [],
91-
"content": "variable-callee = {$variable()}\n"
91+
"content": "variable-callee = {$variable()}\n\n"
9292
},
9393
{
9494
"type": "GroupComment",
@@ -323,7 +323,7 @@
323323
{
324324
"type": "Junk",
325325
"annotations": [],
326-
"content": "shuffled-args = {FUN(1, x: 1, \"a\", y: \"Y\", msg)}\n"
326+
"content": "shuffled-args = {FUN(1, x: 1, \"a\", y: \"Y\", msg)}\n\n"
327327
},
328328
{
329329
"type": "Comment",
@@ -332,7 +332,7 @@
332332
{
333333
"type": "Junk",
334334
"annotations": [],
335-
"content": "duplicate-named-args = {FUN(x: 1, x: \"X\")}\n"
335+
"content": "duplicate-named-args = {FUN(x: 1, x: \"X\")}\n\n\n"
336336
},
337337
{
338338
"type": "GroupComment",
@@ -1063,7 +1063,17 @@
10631063
{
10641064
"type": "Junk",
10651065
"annotations": [],
1066-
"content": "one-argument = {FUN(1,,)}\nmissing-arg = {FUN(,)}\nmissing-sparse-arg = {FUN( , )}\n"
1066+
"content": "one-argument = {FUN(1,,)}\n"
1067+
},
1068+
{
1069+
"type": "Junk",
1070+
"annotations": [],
1071+
"content": "missing-arg = {FUN(,)}\n"
1072+
},
1073+
{
1074+
"type": "Junk",
1075+
"annotations": [],
1076+
"content": "missing-sparse-arg = {FUN( , )}\n\n\n"
10671077
},
10681078
{
10691079
"type": "GroupComment",

fluent-syntax/test/fixtures_reference/crlf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
{
6262
"type": "Junk",
6363
"annotations": [],
64-
"content": "err03 = { \"str\r\n"
64+
"content": "err03 = { \"str\r\n\r\n"
6565
},
6666
{
6767
"type": "Comment",

fluent-syntax/test/fixtures_reference/escaped_characters.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@
169169
{
170170
"type": "Junk",
171171
"annotations": [],
172-
"content": "unknown-escape = {\"\\x\"}\n"
172+
"content": "unknown-escape = {\"\\x\"}\n\n"
173173
},
174174
{
175175
"type": "GroupComment",
Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
1+
## Two adjacent Junks.
2+
err01 = {1x}
3+
err02 = {2x}
4+
5+
# A single Junk.
6+
err03 = {1x
7+
2
8+
9+
# A single Junk.
110
ą=Invalid identifier
211
ć=Another one
312
4-
key01 = {
13+
# The COMMENT ends this junk.
14+
err04 = {
15+
# COMMENT
16+
17+
# The COMMENT ends this junk.
18+
# The closing brace is a separate Junk.
19+
err04 = {
20+
# COMMENT
21+
}
Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,68 @@
11
{
22
"type": "Resource",
33
"body": [
4+
{
5+
"type": "GroupComment",
6+
"content": "Two adjacent Junks."
7+
},
8+
{
9+
"type": "Junk",
10+
"annotations": [],
11+
"content": "err01 = {1x}\n"
12+
},
13+
{
14+
"type": "Junk",
15+
"annotations": [],
16+
"content": "err02 = {2x}\n\n"
17+
},
18+
{
19+
"type": "Comment",
20+
"content": "A single Junk."
21+
},
22+
{
23+
"type": "Junk",
24+
"annotations": [],
25+
"content": "err03 = {1x\n2\n\n"
26+
},
27+
{
28+
"type": "Comment",
29+
"content": "A single Junk."
30+
},
431
{
532
"type": "Junk",
633
"annotations": [],
7-
"content": "ą=Invalid identifier\nć=Another one\n"
34+
"content": "ą=Invalid identifier\nć=Another one\n\n"
35+
},
36+
{
37+
"type": "Comment",
38+
"content": "The COMMENT ends this junk."
39+
},
40+
{
41+
"type": "Junk",
42+
"annotations": [],
43+
"content": "err04 = {\n"
44+
},
45+
{
46+
"type": "Comment",
47+
"content": "COMMENT"
48+
},
49+
{
50+
"type": "Comment",
51+
"content": "The COMMENT ends this junk.\nThe closing brace is a separate Junk."
52+
},
53+
{
54+
"type": "Junk",
55+
"annotations": [],
56+
"content": "err04 = {\n"
57+
},
58+
{
59+
"type": "Comment",
60+
"content": "COMMENT"
861
},
962
{
1063
"type": "Junk",
1164
"annotations": [],
12-
"content": "key01 = {\n"
65+
"content": "}\n"
1366
}
1467
]
1568
}

fluent-syntax/test/fixtures_reference/leading_dots.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@
173173
{
174174
"type": "Junk",
175175
"annotations": [],
176-
"content": " .Continued\n"
176+
"content": " .Continued\n\n"
177177
},
178178
{
179179
"type": "Comment",
@@ -182,7 +182,7 @@
182182
{
183183
"type": "Junk",
184184
"annotations": [],
185-
"content": "key08 =\n .Value\n"
185+
"content": "key08 =\n .Value\n\n"
186186
},
187187
{
188188
"type": "Comment",
@@ -191,7 +191,7 @@
191191
{
192192
"type": "Junk",
193193
"annotations": [],
194-
"content": "key09 =\n .Value\n Continued\n"
194+
"content": "key09 =\n .Value\n Continued\n\n"
195195
},
196196
{
197197
"type": "Message",
@@ -410,7 +410,7 @@
410410
{
411411
"type": "Junk",
412412
"annotations": [],
413-
"content": "key16 =\n { 1 ->\n *[one]\n .Value\n }\n"
413+
"content": "key16 =\n { 1 ->\n *[one]\n .Value\n }\n\n"
414414
},
415415
{
416416
"type": "Comment",
@@ -419,7 +419,7 @@
419419
{
420420
"type": "Junk",
421421
"annotations": [],
422-
"content": "key17 =\n { 1 ->\n *[one] Value\n .Continued\n }\n"
422+
"content": "key17 =\n { 1 ->\n *[one] Value\n .Continued\n }\n\n"
423423
},
424424
{
425425
"type": "Comment",
@@ -428,7 +428,7 @@
428428
{
429429
"type": "Junk",
430430
"annotations": [],
431-
"content": "key18 =\n.Value\n"
431+
"content": "key18 =\n.Value\n\n"
432432
},
433433
{
434434
"type": "Message",

fluent-syntax/test/fixtures_reference/member_expressions.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,12 @@
7070
{
7171
"type": "Junk",
7272
"annotations": [],
73-
"content": "variant-expression = {msg[case]}\nattribute-expression = {-term.attr}\n"
73+
"content": "variant-expression = {msg[case]}\n"
74+
},
75+
{
76+
"type": "Junk",
77+
"annotations": [],
78+
"content": "attribute-expression = {-term.attr}\n"
7479
}
7580
]
7681
}

fluent-syntax/test/fixtures_reference/messages.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@
234234
{
235235
"type": "Junk",
236236
"annotations": [],
237-
"content": "key07 =\n"
237+
"content": "key07 =\n\n"
238238
},
239239
{
240240
"type": "Comment",

fluent-syntax/test/fixtures_reference/mixed_entries.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
{
6262
"type": "Junk",
6363
"annotations": [],
64-
"content": "ą=Invalid identifier\nć=Another one\n"
64+
"content": "ą=Invalid identifier\nć=Another one\n\n"
6565
},
6666
{
6767
"type": "Message",
@@ -91,7 +91,7 @@
9191
{
9292
"type": "Junk",
9393
"annotations": [],
94-
"content": " .attr = Dangling attribute\n"
94+
"content": " .attr = Dangling attribute\n\n"
9595
},
9696
{
9797
"type": "Message",

fluent-syntax/test/fixtures_reference/placeables.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
{
8181
"type": "Junk",
8282
"annotations": [],
83-
"content": "unmatched-open1 = { 1\n"
83+
"content": "unmatched-open1 = { 1\n\n"
8484
},
8585
{
8686
"type": "Comment",
@@ -89,7 +89,7 @@
8989
{
9090
"type": "Junk",
9191
"annotations": [],
92-
"content": "unmatched-open2 = {{ 1 }\n"
92+
"content": "unmatched-open2 = {{ 1 }\n\n"
9393
},
9494
{
9595
"type": "Comment",
@@ -98,7 +98,7 @@
9898
{
9999
"type": "Junk",
100100
"annotations": [],
101-
"content": "unmatched-close1 = 1 }\n"
101+
"content": "unmatched-close1 = 1 }\n\n"
102102
},
103103
{
104104
"type": "Comment",

0 commit comments

Comments
 (0)