php5 test coverage
This commit is contained in:
12
php5/php5.y
12
php5/php5.y
@@ -2565,12 +2565,6 @@ dynamic_class_name_reference:
|
||||
positions.AddPosition($$, positionBuilder.NewNodesPosition($$, nn))
|
||||
comments.AddComments(nn, comments[$1])
|
||||
fmt.Println("343"); $$ = nn
|
||||
|
||||
case *expr.MethodCall:
|
||||
nn.Variable = $$
|
||||
positions.AddPosition($$, positionBuilder.NewNodesPosition($$, nn))
|
||||
comments.AddComments(nn, comments[$1])
|
||||
fmt.Println("344"); $$ = nn
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2587,12 +2581,6 @@ dynamic_class_name_reference:
|
||||
positions.AddPosition($$, positionBuilder.NewNodesPosition($$, nn))
|
||||
comments.AddComments(nn, comments[$1])
|
||||
fmt.Println("346"); $$ = nn
|
||||
|
||||
case *expr.MethodCall:
|
||||
nn.Variable = $$
|
||||
positions.AddPosition($$, positionBuilder.NewNodesPosition($$, nn))
|
||||
comments.AddComments(nn, comments[$1])
|
||||
fmt.Println("347"); $$ = nn
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -357,6 +357,10 @@ CAD;
|
||||
"foo"[0];
|
||||
foo[0];
|
||||
static::foo;
|
||||
|
||||
new $foo;
|
||||
new $a->b[0];
|
||||
new $a->b{$b ?: null}->$c->d[0];
|
||||
`
|
||||
|
||||
expectedParams := []node.Node{
|
||||
@@ -2800,6 +2804,51 @@ CAD;
|
||||
ConstantName: &node.Identifier{Value: "foo"},
|
||||
},
|
||||
},
|
||||
&stmt.Expression{
|
||||
Expr: &expr.New{
|
||||
Class: &expr.Variable{VarName: &node.Identifier{Value: "$foo"}},
|
||||
},
|
||||
},
|
||||
&stmt.Expression{
|
||||
Expr: &expr.New{
|
||||
Class: &expr.ArrayDimFetch{
|
||||
Variable: &expr.PropertyFetch{
|
||||
Variable: &expr.Variable{VarName: &node.Identifier{Value: "$a"}},
|
||||
Property: &node.Identifier{Value: "b"},
|
||||
},
|
||||
Dim: &scalar.Lnumber{Value: "0"},
|
||||
},
|
||||
},
|
||||
},
|
||||
&stmt.Expression{
|
||||
Expr: &expr.New{
|
||||
Class: &expr.ArrayDimFetch{
|
||||
Variable: &expr.PropertyFetch{
|
||||
Variable: &expr.PropertyFetch{
|
||||
Variable: &expr.ArrayDimFetch{
|
||||
Variable: &expr.PropertyFetch{
|
||||
Variable: &expr.Variable{VarName: &node.Identifier{Value: "$a"}},
|
||||
Property: &node.Identifier{Value: "b"},
|
||||
},
|
||||
Dim: &expr.Ternary{
|
||||
Condition: &expr.Variable{VarName: &node.Identifier{Value: "$b"}},
|
||||
IfFalse: &expr.ConstFetch{
|
||||
Constant: &name.Name{
|
||||
Parts: []node.Node{
|
||||
&name.NamePart{Value: "null"},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
Property: &expr.Variable{VarName: &node.Identifier{Value: "$c"}},
|
||||
},
|
||||
Property: &node.Identifier{Value: "d"},
|
||||
},
|
||||
Dim: &scalar.Lnumber{Value: "0"},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user