Skip to content

Commit 655ef3b

Browse files
author
Patrick Thomson
committed
update test cases
1 parent c6e1a4e commit 655ef3b

File tree

18 files changed

+1074
-976
lines changed

18 files changed

+1074
-976
lines changed
Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,51 @@
1-
{"kind":"binary","left":{"kind":"expression","position":{"column":0,"filename":"","line":0,"offset":0},"type":"identifier","value":{"kind":"ident","position":{"column":0,"filename":"","line":0,"offset":0},"value":"ill"}},"operator":"+","position":{"column":0,"filename":"","line":0,"offset":0},"right":{"kind":"expression","position":{"column":0,"filename":"","line":0,"offset":0},"type":"identifier","value":{"kind":"ident","position":{"column":0,"filename":"","line":0,"offset":0},"value":"matic"}},"type":"expression"}
1+
{
2+
"left" : {
3+
"type" : "identifier",
4+
"kind" : "expression",
5+
"position" : {
6+
"column" : 0,
7+
"offset" : 0,
8+
"line" : 0,
9+
"filename" : ""
10+
},
11+
"value" : {
12+
"kind" : "ident",
13+
"position" : {
14+
"filename" : "",
15+
"offset" : 0,
16+
"line" : 0,
17+
"column" : 0
18+
},
19+
"value" : "ill"
20+
}
21+
},
22+
"operator" : "+",
23+
"right" : {
24+
"value" : {
25+
"value" : "matic",
26+
"kind" : "ident",
27+
"position" : {
28+
"filename" : "",
29+
"line" : 0,
30+
"offset" : 0,
31+
"column" : 0
32+
}
33+
},
34+
"kind" : "expression",
35+
"position" : {
36+
"offset" : 0,
37+
"line" : 0,
38+
"column" : 0,
39+
"filename" : ""
40+
},
41+
"type" : "identifier"
42+
},
43+
"position" : {
44+
"column" : 0,
45+
"line" : 0,
46+
"offset" : 0,
47+
"filename" : ""
48+
},
49+
"kind" : "binary",
50+
"type" : "expression"
51+
}

fixtures/expressions/chancast/chan.json

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,54 +2,60 @@
22
"type" : "cast",
33
"target" : {
44
"kind" : "expression",
5+
"type" : "identifier",
56
"position" : {
67
"line" : 0,
7-
"offset" : 0,
8+
"filename" : "",
89
"column" : 0,
9-
"filename" : ""
10+
"offset" : 0
1011
},
1112
"value" : {
1213
"position" : {
13-
"filename" : "",
1414
"offset" : 0,
1515
"column" : 0,
16+
"filename" : "",
1617
"line" : 0
1718
},
18-
"kind" : "ident",
19-
"value" : "foo"
20-
},
21-
"type" : "identifier"
22-
},
23-
"position" : {
24-
"line" : 0,
25-
"filename" : "",
26-
"offset" : 0,
27-
"column" : 0
19+
"value" : "foo",
20+
"kind" : "ident"
21+
}
2822
},
29-
"kind" : "expression",
3023
"coerced-to" : {
24+
"position" : {
25+
"filename" : "",
26+
"line" : 0,
27+
"column" : 0,
28+
"offset" : 0
29+
},
3130
"value" : {
3231
"type" : "identifier",
32+
"kind" : "type",
3333
"value" : {
34-
"kind" : "ident",
34+
"value" : "int",
3535
"position" : {
36-
"line" : 0,
37-
"filename" : "",
3836
"offset" : 0,
39-
"column" : 0
37+
"column" : 0,
38+
"line" : 0,
39+
"filename" : ""
4040
},
41-
"value" : "int"
41+
"kind" : "ident"
4242
},
43-
"kind" : "type",
4443
"position" : {
45-
"line" : 0,
46-
"filename" : "",
4744
"column" : 0,
48-
"offset" : 0
45+
"offset" : 0,
46+
"line" : 0,
47+
"filename" : ""
4948
}
5049
},
51-
"direction" : "both",
5250
"kind" : "type",
51+
"direction" : "both",
5352
"type" : "chan"
53+
},
54+
"kind" : "expression",
55+
"position" : {
56+
"line" : 0,
57+
"filename" : "",
58+
"offset" : 0,
59+
"column" : 0
5460
}
5561
}
Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,50 @@
11
{
2-
"kind" : "expression",
3-
"field" : {
4-
"value" : "baz",
5-
"kind" : "ident",
6-
"position" : {
7-
"filename" : "",
8-
"offset" : 0,
9-
"line" : 0,
10-
"column" : 0
11-
}
12-
},
13-
"type" : "selector",
142
"target" : {
153
"position" : {
4+
"line" : 0,
165
"column" : 0,
176
"filename" : "",
18-
"offset" : 0,
19-
"line" : 0
7+
"offset" : 0
208
},
9+
"kind" : "expression",
2110
"type" : "identifier",
22-
"value" : {
23-
"value" : "bar",
24-
"kind" : "ident",
11+
"qualifier" : {
2512
"position" : {
2613
"column" : 0,
2714
"filename" : "",
28-
"line" : 0,
29-
"offset" : 0
30-
}
15+
"offset" : 0,
16+
"line" : 0
17+
},
18+
"kind" : "ident",
19+
"value" : "foo"
3120
},
32-
"kind" : "expression",
33-
"qualifier" : {
21+
"value" : {
22+
"value" : "bar",
23+
"kind" : "ident",
3424
"position" : {
25+
"column" : 0,
3526
"filename" : "",
3627
"offset" : 0,
37-
"line" : 0,
38-
"column" : 0
39-
},
40-
"value" : "foo",
41-
"kind" : "ident"
28+
"line" : 0
29+
}
4230
}
4331
},
32+
"type" : "selector",
4433
"position" : {
34+
"column" : 0,
4535
"offset" : 0,
46-
"line" : 0,
4736
"filename" : "",
48-
"column" : 0
49-
}
37+
"line" : 0
38+
},
39+
"field" : {
40+
"value" : "baz",
41+
"position" : {
42+
"line" : 0,
43+
"column" : 0,
44+
"offset" : 0,
45+
"filename" : ""
46+
},
47+
"kind" : "ident"
48+
},
49+
"kind" : "expression"
5050
}
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
{
2-
"position" : {
3-
"offset" : 0,
4-
"line" : 0,
5-
"column" : 0,
6-
"filename" : ""
7-
},
2+
"type" : "expression",
83
"right" : {
9-
"type" : "BOOL",
10-
"value" : "true",
11-
"kind" : "literal",
124
"position" : {
135
"offset" : 0,
146
"column" : 0,
157
"line" : 0,
168
"filename" : ""
17-
}
9+
},
10+
"value" : "true",
11+
"type" : "BOOL",
12+
"kind" : "literal"
13+
},
14+
"position" : {
15+
"column" : 0,
16+
"offset" : 0,
17+
"filename" : "",
18+
"line" : 0
1819
},
1920
"left" : {
20-
"type" : "BOOL",
2121
"position" : {
2222
"offset" : 0,
23-
"filename" : "",
2423
"column" : 0,
24+
"filename" : "",
2525
"line" : 0
2626
},
2727
"value" : "false",
28+
"type" : "BOOL",
2829
"kind" : "literal"
2930
},
30-
"kind" : "binary",
3131
"operator" : "||",
32-
"type" : "expression"
32+
"kind" : "binary"
3333
}

0 commit comments

Comments
 (0)