fix node/stmt/t_for_test.go
This commit is contained in:
parent
d79f18f315
commit
eb78ca8b3a
@ -25,20 +25,16 @@ func TestFor(t *testing.T) {
|
|||||||
&stmt.For{
|
&stmt.For{
|
||||||
Init: []node.Node{
|
Init: []node.Node{
|
||||||
&assign_op.Assign{
|
&assign_op.Assign{
|
||||||
assign_op.AssignOp{
|
|
||||||
Variable: &expr.Variable{VarName: &node.Identifier{Value: "$i"}},
|
Variable: &expr.Variable{VarName: &node.Identifier{Value: "$i"}},
|
||||||
Expression: &scalar.Lnumber{Value: "0"},
|
Expression: &scalar.Lnumber{Value: "0"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
|
||||||
Cond: []node.Node{
|
Cond: []node.Node{
|
||||||
&binary_op.Smaller{
|
&binary_op.Smaller{
|
||||||
binary_op.BinaryOp{
|
|
||||||
Left: &expr.Variable{VarName: &node.Identifier{Value: "$i"}},
|
Left: &expr.Variable{VarName: &node.Identifier{Value: "$i"}},
|
||||||
Right: &scalar.Lnumber{Value: "10"},
|
Right: &scalar.Lnumber{Value: "10"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
|
||||||
Loop: []node.Node{
|
Loop: []node.Node{
|
||||||
&expr.PostInc{
|
&expr.PostInc{
|
||||||
Variable: &expr.Variable{VarName: &node.Identifier{Value: "$i"}},
|
Variable: &expr.Variable{VarName: &node.Identifier{Value: "$i"}},
|
||||||
|
Loading…
Reference in New Issue
Block a user