Skip to content

Commit 63cf35a

Browse files
author
Felix Siebeneicker
committed
Updating existing test structures
1 parent ceb5125 commit 63cf35a

14 files changed

+244
-209
lines changed

tests/cases/parser/declareStatement1.php.tree

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,26 @@
2121
"kind": "OpenParenToken",
2222
"textLength": 1
2323
},
24-
"declareDirective": {
25-
"DeclareDirective": {
26-
"name": {
27-
"kind": "Name",
28-
"textLength": 5
29-
},
30-
"equals": {
31-
"kind": "EqualsToken",
32-
"textLength": 1
33-
},
34-
"literal": {
35-
"kind": "IntegerLiteralToken",
36-
"textLength": 1
37-
}
24+
"declareDirectives": {
25+
"DeclareDirectiveList": {
26+
"children": [
27+
{
28+
"DeclareDirective": {
29+
"name": {
30+
"kind": "Name",
31+
"textLength": 5
32+
},
33+
"equals": {
34+
"kind": "EqualsToken",
35+
"textLength": 1
36+
},
37+
"literal": {
38+
"kind": "IntegerLiteralToken",
39+
"textLength": 1
40+
}
41+
}
42+
}
43+
]
3844
}
3945
},
4046
"closeParen": {

tests/cases/parser/declareStatement10.php.tree

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,26 @@
2121
"kind": "OpenParenToken",
2222
"textLength": 1
2323
},
24-
"declareDirective": {
25-
"DeclareDirective": {
26-
"name": {
27-
"kind": "Name",
28-
"textLength": 5
29-
},
30-
"equals": {
31-
"kind": "EqualsToken",
32-
"textLength": 1
33-
},
34-
"literal": {
35-
"kind": "FloatingLiteralToken",
36-
"textLength": 3
37-
}
24+
"declareDirectives": {
25+
"DeclareDirectiveList": {
26+
"children": [
27+
{
28+
"DeclareDirective": {
29+
"name": {
30+
"kind": "Name",
31+
"textLength": 5
32+
},
33+
"equals": {
34+
"kind": "EqualsToken",
35+
"textLength": 1
36+
},
37+
"literal": {
38+
"kind": "FloatingLiteralToken",
39+
"textLength": 3
40+
}
41+
}
42+
}
43+
]
3844
}
3945
},
4046
"closeParen": {

tests/cases/parser/declareStatement11.php.tree

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,26 @@
2121
"kind": "OpenParenToken",
2222
"textLength": 1
2323
},
24-
"declareDirective": {
25-
"DeclareDirective": {
26-
"name": {
27-
"kind": "Name",
28-
"textLength": 5
29-
},
30-
"equals": {
31-
"kind": "EqualsToken",
32-
"textLength": 1
33-
},
34-
"literal": {
35-
"kind": "FloatingLiteralToken",
36-
"textLength": 3
37-
}
24+
"declareDirectives": {
25+
"DeclareDirectiveList": {
26+
"children": [
27+
{
28+
"DeclareDirective": {
29+
"name": {
30+
"kind": "Name",
31+
"textLength": 5
32+
},
33+
"equals": {
34+
"kind": "EqualsToken",
35+
"textLength": 1
36+
},
37+
"literal": {
38+
"kind": "FloatingLiteralToken",
39+
"textLength": 3
40+
}
41+
}
42+
}
43+
]
3844
}
3945
},
4046
"closeParen": {
Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1 @@
1-
[
2-
{
3-
"kind": 0,
4-
"message": "'Name' expected.",
5-
"start": 16,
6-
"length": 0
7-
},
8-
{
9-
"kind": 0,
10-
"message": "'=' expected.",
11-
"start": 16,
12-
"length": 0
13-
},
14-
{
15-
"kind": 0,
16-
"message": "'FloatingLiteralToken' expected.",
17-
"start": 16,
18-
"length": 0
19-
}
20-
]
1+
[]

tests/cases/parser/declareStatement12.php.tree

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,7 @@
2121
"kind": "OpenParenToken",
2222
"textLength": 1
2323
},
24-
"declareDirective": {
25-
"DeclareDirective": {
26-
"name": {
27-
"error": "MissingToken",
28-
"kind": "Name",
29-
"textLength": 0
30-
},
31-
"equals": {
32-
"error": "MissingToken",
33-
"kind": "EqualsToken",
34-
"textLength": 0
35-
},
36-
"literal": {
37-
"error": "MissingToken",
38-
"kind": "FloatingLiteralToken",
39-
"textLength": 0
40-
}
41-
}
42-
},
24+
"declareDirectives": null,
4325
"closeParen": {
4426
"kind": "CloseParenToken",
4527
"textLength": 1

tests/cases/parser/declareStatement13.php.tree

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,26 @@
2121
"kind": "OpenParenToken",
2222
"textLength": 1
2323
},
24-
"declareDirective": {
25-
"DeclareDirective": {
26-
"name": {
27-
"kind": "Name",
28-
"textLength": 5
29-
},
30-
"equals": {
31-
"kind": "EqualsToken",
32-
"textLength": 1
33-
},
34-
"literal": {
35-
"kind": "IntegerLiteralToken",
36-
"textLength": 1
37-
}
24+
"declareDirectives": {
25+
"DeclareDirectiveList": {
26+
"children": [
27+
{
28+
"DeclareDirective": {
29+
"name": {
30+
"kind": "Name",
31+
"textLength": 5
32+
},
33+
"equals": {
34+
"kind": "EqualsToken",
35+
"textLength": 1
36+
},
37+
"literal": {
38+
"kind": "IntegerLiteralToken",
39+
"textLength": 1
40+
}
41+
}
42+
}
43+
]
3844
}
3945
},
4046
"closeParen": {

tests/cases/parser/declareStatement2.php.tree

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,26 @@
2121
"kind": "OpenParenToken",
2222
"textLength": 1
2323
},
24-
"declareDirective": {
25-
"DeclareDirective": {
26-
"name": {
27-
"kind": "Name",
28-
"textLength": 5
29-
},
30-
"equals": {
31-
"kind": "EqualsToken",
32-
"textLength": 1
33-
},
34-
"literal": {
35-
"kind": "IntegerLiteralToken",
36-
"textLength": 1
37-
}
24+
"declareDirectives": {
25+
"DeclareDirectiveList": {
26+
"children": [
27+
{
28+
"DeclareDirective": {
29+
"name": {
30+
"kind": "Name",
31+
"textLength": 5
32+
},
33+
"equals": {
34+
"kind": "EqualsToken",
35+
"textLength": 1
36+
},
37+
"literal": {
38+
"kind": "IntegerLiteralToken",
39+
"textLength": 1
40+
}
41+
}
42+
}
43+
]
3844
}
3945
},
4046
"closeParen": {

tests/cases/parser/declareStatement3.php.tree

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,26 @@
2121
"kind": "OpenParenToken",
2222
"textLength": 1
2323
},
24-
"declareDirective": {
25-
"DeclareDirective": {
26-
"name": {
27-
"kind": "Name",
28-
"textLength": 5
29-
},
30-
"equals": {
31-
"kind": "EqualsToken",
32-
"textLength": 1
33-
},
34-
"literal": {
35-
"kind": "IntegerLiteralToken",
36-
"textLength": 1
37-
}
24+
"declareDirectives": {
25+
"DeclareDirectiveList": {
26+
"children": [
27+
{
28+
"DeclareDirective": {
29+
"name": {
30+
"kind": "Name",
31+
"textLength": 5
32+
},
33+
"equals": {
34+
"kind": "EqualsToken",
35+
"textLength": 1
36+
},
37+
"literal": {
38+
"kind": "IntegerLiteralToken",
39+
"textLength": 1
40+
}
41+
}
42+
}
43+
]
3844
}
3945
},
4046
"closeParen": {

tests/cases/parser/declareStatement4.php.tree

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,26 @@
2121
"kind": "OpenParenToken",
2222
"textLength": 1
2323
},
24-
"declareDirective": {
25-
"DeclareDirective": {
26-
"name": {
27-
"kind": "Name",
28-
"textLength": 2
29-
},
30-
"equals": {
31-
"kind": "EqualsToken",
32-
"textLength": 1
33-
},
34-
"literal": {
35-
"kind": "IntegerLiteralToken",
36-
"textLength": 1
37-
}
24+
"declareDirectives": {
25+
"DeclareDirectiveList": {
26+
"children": [
27+
{
28+
"DeclareDirective": {
29+
"name": {
30+
"kind": "Name",
31+
"textLength": 2
32+
},
33+
"equals": {
34+
"kind": "EqualsToken",
35+
"textLength": 1
36+
},
37+
"literal": {
38+
"kind": "IntegerLiteralToken",
39+
"textLength": 1
40+
}
41+
}
42+
}
43+
]
3844
}
3945
},
4046
"closeParen": {

tests/cases/parser/declareStatement5.php.tree

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,26 @@
2121
"kind": "OpenParenToken",
2222
"textLength": 1
2323
},
24-
"declareDirective": {
25-
"DeclareDirective": {
26-
"name": {
27-
"kind": "Name",
28-
"textLength": 5
29-
},
30-
"equals": {
31-
"kind": "EqualsToken",
32-
"textLength": 1
33-
},
34-
"literal": {
35-
"kind": "IntegerLiteralToken",
36-
"textLength": 1
37-
}
24+
"declareDirectives": {
25+
"DeclareDirectiveList": {
26+
"children": [
27+
{
28+
"DeclareDirective": {
29+
"name": {
30+
"kind": "Name",
31+
"textLength": 5
32+
},
33+
"equals": {
34+
"kind": "EqualsToken",
35+
"textLength": 1
36+
},
37+
"literal": {
38+
"kind": "IntegerLiteralToken",
39+
"textLength": 1
40+
}
41+
}
42+
}
43+
]
3844
}
3945
},
4046
"closeParen": {

0 commit comments

Comments
 (0)