This commit is contained in:
z7zmey 2018-07-01 00:38:31 +03:00
parent 8de55d266c
commit 978e609f29
4 changed files with 11839 additions and 12017 deletions

View File

@ -21,7 +21,7 @@ bench:
go test -benchmem -bench=. ./php5
go test -benchmem -bench=. ./php7
compile: ./php5/php5.go ./php7/php7.go ./scanner/scanner.go
compile: ./php5/php5.go ./php7/php7.go ./scanner/scanner.go fmt
sed -i '' -e 's/yyErrorVerbose = false/yyErrorVerbose = true/g' ./php7/php7.go
sed -i '' -e 's/yyErrorVerbose = false/yyErrorVerbose = true/g' ./php5/php5.go
rm -f y.output

View File

@ -347,7 +347,6 @@ const yyErrCode = 2
const yyInitialStackSize = 16
//line php5/php5.y:6789
type simpleIndirectReference struct {
all []*expr.Variable
last *expr.Variable

View File

@ -1176,8 +1176,7 @@ func TestPhp5(t *testing.T) {
},
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Class{
Position: &position.Position{
@ -1354,8 +1353,7 @@ func TestPhp5(t *testing.T) {
StartPos: 244,
EndPos: 245,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -1498,8 +1496,7 @@ func TestPhp5(t *testing.T) {
},
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.Expression{
@ -1640,8 +1637,7 @@ func TestPhp5(t *testing.T) {
},
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.Expression{
@ -2531,8 +2527,7 @@ func TestPhp5(t *testing.T) {
StartPos: -1,
EndPos: -1,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.AltIf{
@ -2566,8 +2561,7 @@ func TestPhp5(t *testing.T) {
StartPos: -1,
EndPos: -1,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
ElseIf: []node.Node{
&stmt.AltElseIf{
@ -2601,8 +2595,7 @@ func TestPhp5(t *testing.T) {
StartPos: -1,
EndPos: -1,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -2638,8 +2631,7 @@ func TestPhp5(t *testing.T) {
StartPos: -1,
EndPos: -1,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
Else: &stmt.AltElse{
Position: &position.Position{
@ -2655,8 +2647,7 @@ func TestPhp5(t *testing.T) {
StartPos: -1,
EndPos: -1,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -2691,8 +2682,7 @@ func TestPhp5(t *testing.T) {
StartPos: -1,
EndPos: -1,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
ElseIf: []node.Node{
&stmt.AltElseIf{
@ -2726,8 +2716,7 @@ func TestPhp5(t *testing.T) {
StartPos: -1,
EndPos: -1,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.AltElseIf{
@ -2761,8 +2750,7 @@ func TestPhp5(t *testing.T) {
StartPos: -1,
EndPos: -1,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -2780,8 +2768,7 @@ func TestPhp5(t *testing.T) {
StartPos: -1,
EndPos: -1,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -3035,8 +3022,7 @@ func TestPhp5(t *testing.T) {
StartPos: 1217,
EndPos: 1218,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -3104,8 +3090,7 @@ func TestPhp5(t *testing.T) {
StartPos: 1265,
EndPos: 1266,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -3173,8 +3158,7 @@ func TestPhp5(t *testing.T) {
StartPos: 1312,
EndPos: 1313,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.ClassMethod{
@ -3213,8 +3197,7 @@ func TestPhp5(t *testing.T) {
StartPos: 1340,
EndPos: 1341,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -3352,8 +3335,7 @@ func TestPhp5(t *testing.T) {
},
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Class{
Position: &position.Position{
@ -3412,8 +3394,7 @@ func TestPhp5(t *testing.T) {
},
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Class{
Position: &position.Position{
@ -3491,8 +3472,7 @@ func TestPhp5(t *testing.T) {
},
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.ConstList{
Position: &position.Position{
@ -3796,8 +3776,7 @@ func TestPhp5(t *testing.T) {
StartPos: 1679,
EndPos: 1680,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.Declare{
@ -3843,8 +3822,7 @@ func TestPhp5(t *testing.T) {
StartPos: 1700,
EndPos: 1712,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.Do{
@ -3861,8 +3839,7 @@ func TestPhp5(t *testing.T) {
StartPos: 1719,
EndPos: 1720,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
Cond: &scalar.Lnumber{
Position: &position.Position{
@ -4075,8 +4052,7 @@ func TestPhp5(t *testing.T) {
StartPos: 1793,
EndPos: 1794,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.AltFor{
@ -4156,8 +4132,7 @@ func TestPhp5(t *testing.T) {
StartPos: -1,
EndPos: -1,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.Foreach{
@ -4208,8 +4183,7 @@ func TestPhp5(t *testing.T) {
StartPos: 1850,
EndPos: 1851,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.Foreach{
@ -4226,8 +4200,7 @@ func TestPhp5(t *testing.T) {
StartPos: 1864,
EndPos: 1865,
},
Items: []node.Node{
},
Items: []node.Node{},
},
Variable: &expr.Variable{
Position: &position.Position{
@ -4253,8 +4226,7 @@ func TestPhp5(t *testing.T) {
StartPos: 1874,
EndPos: 1875,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.AltForeach{
@ -4305,8 +4277,7 @@ func TestPhp5(t *testing.T) {
StartPos: -1,
EndPos: -1,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.Foreach{
@ -4374,8 +4345,7 @@ func TestPhp5(t *testing.T) {
StartPos: 1939,
EndPos: 1940,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.Foreach{
@ -4392,8 +4362,7 @@ func TestPhp5(t *testing.T) {
StartPos: 1953,
EndPos: 1954,
},
Items: []node.Node{
},
Items: []node.Node{},
},
Key: &expr.Variable{
Position: &position.Position{
@ -4436,8 +4405,7 @@ func TestPhp5(t *testing.T) {
StartPos: 1969,
EndPos: 1970,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.Foreach{
@ -4513,8 +4481,7 @@ func TestPhp5(t *testing.T) {
StartPos: 2000,
EndPos: 2001,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.Foreach{
@ -4600,8 +4567,7 @@ func TestPhp5(t *testing.T) {
StartPos: 2036,
EndPos: 2037,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.Function{
@ -4622,8 +4588,7 @@ func TestPhp5(t *testing.T) {
},
Value: "foo",
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Function{
Position: &position.Position{
@ -4670,8 +4635,7 @@ func TestPhp5(t *testing.T) {
},
Value: "bar",
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Class{
Position: &position.Position{
@ -4690,8 +4654,7 @@ func TestPhp5(t *testing.T) {
},
Value: "Baz",
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Return{
Position: &position.Position{
@ -4879,8 +4842,7 @@ func TestPhp5(t *testing.T) {
},
Value: "foo",
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Global{
Position: &position.Position{
@ -5067,8 +5029,7 @@ func TestPhp5(t *testing.T) {
StartPos: 2337,
EndPos: 2338,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.If{
@ -5102,8 +5063,7 @@ func TestPhp5(t *testing.T) {
StartPos: 2350,
EndPos: 2351,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
ElseIf: []node.Node{
&stmt.ElseIf{
@ -5137,8 +5097,7 @@ func TestPhp5(t *testing.T) {
StartPos: 2365,
EndPos: 2366,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -5174,8 +5133,7 @@ func TestPhp5(t *testing.T) {
StartPos: 2378,
EndPos: 2379,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
Else: &stmt.Else{
Position: &position.Position{
@ -5191,8 +5149,7 @@ func TestPhp5(t *testing.T) {
StartPos: 2386,
EndPos: 2387,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -5227,8 +5184,7 @@ func TestPhp5(t *testing.T) {
StartPos: 2399,
EndPos: 2400,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
ElseIf: []node.Node{
&stmt.ElseIf{
@ -5262,8 +5218,7 @@ func TestPhp5(t *testing.T) {
StartPos: 2414,
EndPos: 2415,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.ElseIf{
@ -5297,8 +5252,7 @@ func TestPhp5(t *testing.T) {
StartPos: 2429,
EndPos: 2430,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -5316,8 +5270,7 @@ func TestPhp5(t *testing.T) {
StartPos: 2437,
EndPos: 2438,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -5352,8 +5305,7 @@ func TestPhp5(t *testing.T) {
StartPos: 2450,
EndPos: 2451,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
ElseIf: []node.Node{
&stmt.ElseIf{
@ -5387,8 +5339,7 @@ func TestPhp5(t *testing.T) {
StartPos: 2465,
EndPos: 2466,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -5430,8 +5381,7 @@ func TestPhp5(t *testing.T) {
StartPos: 2481,
EndPos: 2482,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
Else: &stmt.Else{
Position: &position.Position{
@ -5447,8 +5397,7 @@ func TestPhp5(t *testing.T) {
StartPos: 2489,
EndPos: 2490,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -5488,8 +5437,7 @@ func TestPhp5(t *testing.T) {
},
Value: "Foo",
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Interface{
Position: &position.Position{
@ -5537,8 +5485,7 @@ func TestPhp5(t *testing.T) {
},
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Interface{
Position: &position.Position{
@ -5605,8 +5552,7 @@ func TestPhp5(t *testing.T) {
},
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Namespace{
Position: &position.Position{
@ -5670,8 +5616,7 @@ func TestPhp5(t *testing.T) {
},
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Namespace{
Position: &position.Position{
@ -5680,8 +5625,7 @@ func TestPhp5(t *testing.T) {
StartPos: 2640,
EndPos: 2651,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Class{
Position: &position.Position{
@ -6150,8 +6094,7 @@ func TestPhp5(t *testing.T) {
},
Value: "1",
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Default{
Position: &position.Position{
@ -6160,8 +6103,7 @@ func TestPhp5(t *testing.T) {
StartPos: 2827,
EndPos: -1,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Case{
Position: &position.Position{
@ -6179,8 +6121,7 @@ func TestPhp5(t *testing.T) {
},
Value: "2",
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -6225,8 +6166,7 @@ func TestPhp5(t *testing.T) {
},
Value: "1",
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Case{
Position: &position.Position{
@ -6244,8 +6184,7 @@ func TestPhp5(t *testing.T) {
},
Value: "2",
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -6454,8 +6393,7 @@ func TestPhp5(t *testing.T) {
},
Value: "Foo",
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Class{
Position: &position.Position{
@ -7037,10 +6975,8 @@ func TestPhp5(t *testing.T) {
StartPos: 3296,
EndPos: -1,
},
Stmts: []node.Node{
},
Catches: []node.Node{
},
Stmts: []node.Node{},
Catches: []node.Node{},
},
&stmt.Try{
Position: &position.Position{
@ -7049,8 +6985,7 @@ func TestPhp5(t *testing.T) {
StartPos: 3305,
EndPos: 3334,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
Catches: []node.Node{
&stmt.Catch{
Position: &position.Position{
@ -7097,8 +7032,7 @@ func TestPhp5(t *testing.T) {
Value: "e",
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -7109,8 +7043,7 @@ func TestPhp5(t *testing.T) {
StartPos: 3338,
EndPos: 3398,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
Catches: []node.Node{
&stmt.Catch{
Position: &position.Position{
@ -7157,8 +7090,7 @@ func TestPhp5(t *testing.T) {
Value: "e",
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Catch{
Position: &position.Position{
@ -7205,8 +7137,7 @@ func TestPhp5(t *testing.T) {
Value: "e",
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -7217,8 +7148,7 @@ func TestPhp5(t *testing.T) {
StartPos: 3402,
EndPos: 3505,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
Catches: []node.Node{
&stmt.Catch{
Position: &position.Position{
@ -7265,8 +7195,7 @@ func TestPhp5(t *testing.T) {
Value: "e",
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Catch{
Position: &position.Position{
@ -7313,8 +7242,7 @@ func TestPhp5(t *testing.T) {
Value: "e",
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Catch{
Position: &position.Position{
@ -7361,8 +7289,7 @@ func TestPhp5(t *testing.T) {
Value: "e",
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -7373,8 +7300,7 @@ func TestPhp5(t *testing.T) {
StartPos: 3509,
EndPos: 3549,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
Catches: []node.Node{
&stmt.Catch{
Position: &position.Position{
@ -7421,8 +7347,7 @@ func TestPhp5(t *testing.T) {
Value: "e",
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
Finally: &stmt.Finally{
@ -7432,8 +7357,7 @@ func TestPhp5(t *testing.T) {
StartPos: 3540,
EndPos: 3549,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.Unset{
@ -8180,8 +8104,7 @@ func TestPhp5(t *testing.T) {
StartPos: 3801,
EndPos: 3807,
},
Items: []node.Node{
},
Items: []node.Node{},
},
},
&stmt.Expression{
@ -8293,8 +8216,7 @@ func TestPhp5(t *testing.T) {
},
},
},
&expr.ArrayItem{
},
&expr.ArrayItem{},
},
},
},
@ -8687,8 +8609,7 @@ func TestPhp5(t *testing.T) {
ReturnsRef: false,
Static: false,
PhpDocComment: "",
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.Expression{
@ -8816,8 +8737,7 @@ func TestPhp5(t *testing.T) {
},
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.Expression{
@ -8945,8 +8865,7 @@ func TestPhp5(t *testing.T) {
},
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.Expression{
@ -8966,8 +8885,7 @@ func TestPhp5(t *testing.T) {
ReturnsRef: false,
Static: false,
PhpDocComment: "",
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.Expression{
@ -9487,8 +9405,7 @@ func TestPhp5(t *testing.T) {
StartPos: 4209,
EndPos: 4210,
},
Items: []node.Node{
},
Items: []node.Node{},
},
},
},
@ -10111,8 +10028,7 @@ func TestPhp5(t *testing.T) {
StartPos: 4441,
EndPos: 4446,
},
Items: []node.Node{
},
Items: []node.Node{},
},
Expression: &expr.Variable{
Position: &position.Position{
@ -10974,8 +10890,7 @@ func TestPhp5(t *testing.T) {
StartPos: 4691,
EndPos: 4692,
},
Parts: []node.Node{
},
Parts: []node.Node{},
},
},
&stmt.Expression{
@ -10992,8 +10907,7 @@ func TestPhp5(t *testing.T) {
StartPos: 4697,
EndPos: 4698,
},
Items: []node.Node{
},
Items: []node.Node{},
},
},
&stmt.Expression{
@ -11105,8 +11019,7 @@ func TestPhp5(t *testing.T) {
},
},
},
&expr.ArrayItem{
},
&expr.ArrayItem{},
},
},
},
@ -18122,8 +18035,7 @@ func TestPhp5(t *testing.T) {
StartPos: 6873,
EndPos: 6874,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.Expression{

View File

@ -1090,8 +1090,7 @@ func TestPhp7(t *testing.T) {
},
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -1117,8 +1116,7 @@ func TestPhp7(t *testing.T) {
EndPos: 200,
},
PhpDocComment: "",
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -1568,8 +1566,7 @@ func TestPhp7(t *testing.T) {
},
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Class{
Position: &position.Position{
@ -1754,8 +1751,7 @@ func TestPhp7(t *testing.T) {
StartPos: 415,
EndPos: 416,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -1906,8 +1902,7 @@ func TestPhp7(t *testing.T) {
},
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.Expression{
@ -2056,8 +2051,7 @@ func TestPhp7(t *testing.T) {
},
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.Expression{
@ -3129,8 +3123,7 @@ func TestPhp7(t *testing.T) {
StartPos: -1,
EndPos: -1,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.AltIf{
@ -3164,8 +3157,7 @@ func TestPhp7(t *testing.T) {
StartPos: -1,
EndPos: -1,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
ElseIf: []node.Node{
&stmt.AltElseIf{
@ -3199,8 +3191,7 @@ func TestPhp7(t *testing.T) {
StartPos: -1,
EndPos: -1,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -3236,8 +3227,7 @@ func TestPhp7(t *testing.T) {
StartPos: -1,
EndPos: -1,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
Else: &stmt.AltElse{
Position: &position.Position{
@ -3253,8 +3243,7 @@ func TestPhp7(t *testing.T) {
StartPos: -1,
EndPos: -1,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -3289,8 +3278,7 @@ func TestPhp7(t *testing.T) {
StartPos: -1,
EndPos: -1,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
ElseIf: []node.Node{
&stmt.AltElseIf{
@ -3324,8 +3312,7 @@ func TestPhp7(t *testing.T) {
StartPos: -1,
EndPos: -1,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.AltElseIf{
@ -3359,8 +3346,7 @@ func TestPhp7(t *testing.T) {
StartPos: -1,
EndPos: -1,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -3378,8 +3364,7 @@ func TestPhp7(t *testing.T) {
StartPos: -1,
EndPos: -1,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -3728,8 +3713,7 @@ func TestPhp7(t *testing.T) {
StartPos: 1531,
EndPos: 1532,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -3797,8 +3781,7 @@ func TestPhp7(t *testing.T) {
StartPos: 1579,
EndPos: 1580,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -3885,8 +3868,7 @@ func TestPhp7(t *testing.T) {
StartPos: 1633,
EndPos: 1634,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -3919,8 +3901,7 @@ func TestPhp7(t *testing.T) {
Value: "abstract",
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Class{
Position: &position.Position{
@ -3977,8 +3958,7 @@ func TestPhp7(t *testing.T) {
},
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Class{
Position: &position.Position{
@ -4037,8 +4017,7 @@ func TestPhp7(t *testing.T) {
},
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Class{
Position: &position.Position{
@ -4116,8 +4095,7 @@ func TestPhp7(t *testing.T) {
},
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Expression{
Position: &position.Position{
@ -4224,8 +4202,7 @@ func TestPhp7(t *testing.T) {
},
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -4504,8 +4481,7 @@ func TestPhp7(t *testing.T) {
StartPos: 1975,
EndPos: 1976,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.Declare{
@ -4551,8 +4527,7 @@ func TestPhp7(t *testing.T) {
StartPos: 1996,
EndPos: 2008,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.Do{
@ -4569,8 +4544,7 @@ func TestPhp7(t *testing.T) {
StartPos: 2015,
EndPos: 2016,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
Cond: &scalar.Lnumber{
Position: &position.Position{
@ -4783,8 +4757,7 @@ func TestPhp7(t *testing.T) {
StartPos: 2089,
EndPos: 2090,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.AltFor{
@ -4889,8 +4862,7 @@ func TestPhp7(t *testing.T) {
StartPos: -1,
EndPos: -1,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.Foreach{
@ -4941,8 +4913,7 @@ func TestPhp7(t *testing.T) {
StartPos: 2152,
EndPos: 2153,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.AltForeach{
@ -4993,8 +4964,7 @@ func TestPhp7(t *testing.T) {
StartPos: -1,
EndPos: -1,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.Foreach{
@ -5062,8 +5032,7 @@ func TestPhp7(t *testing.T) {
StartPos: 2217,
EndPos: 2218,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.Foreach{
@ -5139,8 +5108,7 @@ func TestPhp7(t *testing.T) {
StartPos: 2248,
EndPos: 2249,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.Foreach{
@ -5226,8 +5194,7 @@ func TestPhp7(t *testing.T) {
StartPos: 2284,
EndPos: 2285,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.Foreach{
@ -5313,8 +5280,7 @@ func TestPhp7(t *testing.T) {
StartPos: 2316,
EndPos: 2317,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.Function{
@ -5335,8 +5301,7 @@ func TestPhp7(t *testing.T) {
},
Value: "foo",
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Function{
Position: &position.Position{
@ -5442,8 +5407,7 @@ func TestPhp7(t *testing.T) {
},
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Global{
Position: &position.Position{
@ -5562,8 +5526,7 @@ func TestPhp7(t *testing.T) {
StartPos: 2487,
EndPos: 2488,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.If{
@ -5597,8 +5560,7 @@ func TestPhp7(t *testing.T) {
StartPos: 2500,
EndPos: 2501,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
ElseIf: []node.Node{
&stmt.ElseIf{
@ -5632,8 +5594,7 @@ func TestPhp7(t *testing.T) {
StartPos: 2515,
EndPos: 2516,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -5669,8 +5630,7 @@ func TestPhp7(t *testing.T) {
StartPos: 2528,
EndPos: 2529,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
Else: &stmt.Else{
Position: &position.Position{
@ -5686,8 +5646,7 @@ func TestPhp7(t *testing.T) {
StartPos: 2536,
EndPos: 2537,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -5722,8 +5681,7 @@ func TestPhp7(t *testing.T) {
StartPos: 2549,
EndPos: 2550,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
ElseIf: []node.Node{
&stmt.ElseIf{
@ -5757,8 +5715,7 @@ func TestPhp7(t *testing.T) {
StartPos: 2564,
EndPos: 2565,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.ElseIf{
@ -5792,8 +5749,7 @@ func TestPhp7(t *testing.T) {
StartPos: 2579,
EndPos: 2580,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -5811,8 +5767,7 @@ func TestPhp7(t *testing.T) {
StartPos: 2587,
EndPos: 2588,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -5847,8 +5802,7 @@ func TestPhp7(t *testing.T) {
StartPos: 2600,
EndPos: 2601,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
ElseIf: []node.Node{
&stmt.ElseIf{
@ -5882,8 +5836,7 @@ func TestPhp7(t *testing.T) {
StartPos: 2615,
EndPos: 2616,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -5925,8 +5878,7 @@ func TestPhp7(t *testing.T) {
StartPos: 2631,
EndPos: 2632,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
Else: &stmt.Else{
Position: &position.Position{
@ -5942,8 +5894,7 @@ func TestPhp7(t *testing.T) {
StartPos: 2639,
EndPos: 2640,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -5983,8 +5934,7 @@ func TestPhp7(t *testing.T) {
},
Value: "Foo",
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Interface{
Position: &position.Position{
@ -6032,8 +5982,7 @@ func TestPhp7(t *testing.T) {
},
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Interface{
Position: &position.Position{
@ -6100,8 +6049,7 @@ func TestPhp7(t *testing.T) {
},
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Namespace{
Position: &position.Position{
@ -6156,8 +6104,7 @@ func TestPhp7(t *testing.T) {
},
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Namespace{
Position: &position.Position{
@ -6166,8 +6113,7 @@ func TestPhp7(t *testing.T) {
StartPos: 2786,
EndPos: 2797,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Class{
Position: &position.Position{
@ -6456,8 +6402,7 @@ func TestPhp7(t *testing.T) {
},
Value: "1",
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Default{
Position: &position.Position{
@ -6466,8 +6411,7 @@ func TestPhp7(t *testing.T) {
StartPos: 2912,
EndPos: -1,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Case{
Position: &position.Position{
@ -6485,8 +6429,7 @@ func TestPhp7(t *testing.T) {
},
Value: "2",
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -6531,8 +6474,7 @@ func TestPhp7(t *testing.T) {
},
Value: "1",
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Case{
Position: &position.Position{
@ -6550,8 +6492,7 @@ func TestPhp7(t *testing.T) {
},
Value: "2",
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -6760,8 +6701,7 @@ func TestPhp7(t *testing.T) {
},
Value: "Foo",
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Class{
Position: &position.Position{
@ -7455,10 +7395,8 @@ func TestPhp7(t *testing.T) {
StartPos: 3432,
EndPos: -1,
},
Stmts: []node.Node{
},
Catches: []node.Node{
},
Stmts: []node.Node{},
Catches: []node.Node{},
},
&stmt.Try{
Position: &position.Position{
@ -7467,8 +7405,7 @@ func TestPhp7(t *testing.T) {
StartPos: 3441,
EndPos: 3470,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
Catches: []node.Node{
&stmt.Catch{
Position: &position.Position{
@ -7515,8 +7452,7 @@ func TestPhp7(t *testing.T) {
Value: "e",
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -7527,8 +7463,7 @@ func TestPhp7(t *testing.T) {
StartPos: 3474,
EndPos: 3520,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
Catches: []node.Node{
&stmt.Catch{
Position: &position.Position{
@ -7594,8 +7529,7 @@ func TestPhp7(t *testing.T) {
Value: "e",
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -7606,8 +7540,7 @@ func TestPhp7(t *testing.T) {
StartPos: 3524,
EndPos: 3584,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
Catches: []node.Node{
&stmt.Catch{
Position: &position.Position{
@ -7654,8 +7587,7 @@ func TestPhp7(t *testing.T) {
Value: "e",
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Catch{
Position: &position.Position{
@ -7702,8 +7634,7 @@ func TestPhp7(t *testing.T) {
Value: "e",
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -7714,8 +7645,7 @@ func TestPhp7(t *testing.T) {
StartPos: 3588,
EndPos: 3628,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
Catches: []node.Node{
&stmt.Catch{
Position: &position.Position{
@ -7762,8 +7692,7 @@ func TestPhp7(t *testing.T) {
Value: "e",
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
Finally: &stmt.Finally{
@ -7773,8 +7702,7 @@ func TestPhp7(t *testing.T) {
StartPos: 3619,
EndPos: 3628,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.Unset{
@ -8981,8 +8909,7 @@ func TestPhp7(t *testing.T) {
StartPos: 4032,
EndPos: 4038,
},
Items: []node.Node{
},
Items: []node.Node{},
},
},
&stmt.Expression{
@ -9094,8 +9021,7 @@ func TestPhp7(t *testing.T) {
},
},
},
&expr.ArrayItem{
},
&expr.ArrayItem{},
},
},
},
@ -9334,8 +9260,7 @@ func TestPhp7(t *testing.T) {
ReturnsRef: false,
Static: false,
PhpDocComment: "",
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.Expression{
@ -9463,8 +9388,7 @@ func TestPhp7(t *testing.T) {
},
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.Expression{
@ -9503,8 +9427,7 @@ func TestPhp7(t *testing.T) {
},
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
&stmt.Expression{
@ -10946,8 +10869,7 @@ func TestPhp7(t *testing.T) {
},
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -11105,8 +11027,7 @@ func TestPhp7(t *testing.T) {
StartPos: 4757,
EndPos: 4758,
},
Parts: []node.Node{
},
Parts: []node.Node{},
},
},
&stmt.Expression{
@ -11123,8 +11044,7 @@ func TestPhp7(t *testing.T) {
StartPos: 4763,
EndPos: 4764,
},
Items: []node.Node{
},
Items: []node.Node{},
},
},
&stmt.Expression{
@ -11236,8 +11156,7 @@ func TestPhp7(t *testing.T) {
},
},
},
&expr.ArrayItem{
},
&expr.ArrayItem{},
},
},
},
@ -14833,8 +14752,7 @@ func TestPhp7(t *testing.T) {
StartPos: 5778,
EndPos: 5779,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -14992,8 +14910,7 @@ func TestPhp7(t *testing.T) {
},
Value: "bar",
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Class{
Position: &position.Position{
@ -15012,8 +14929,7 @@ func TestPhp7(t *testing.T) {
},
Value: "Baz",
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Trait{
Position: &position.Position{
@ -15032,8 +14948,7 @@ func TestPhp7(t *testing.T) {
},
Value: "Quux",
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Interface{
Position: &position.Position{
@ -15052,8 +14967,7 @@ func TestPhp7(t *testing.T) {
},
Value: "Quuux",
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},
@ -15185,8 +15099,7 @@ func TestPhp7(t *testing.T) {
},
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Function{
Position: &position.Position{
@ -15280,8 +15193,7 @@ func TestPhp7(t *testing.T) {
},
},
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
&stmt.Class{
Position: &position.Position{
@ -15422,8 +15334,7 @@ func TestPhp7(t *testing.T) {
StartPos: 6118,
EndPos: 6119,
},
Stmts: []node.Node{
},
Stmts: []node.Node{},
},
},
},