diff --git a/node/expr/assign/n_assign_ref.go b/node/expr/assign/n_assign_ref.go index 7998cc4..37dc745 100644 --- a/node/expr/assign/n_assign_ref.go +++ b/node/expr/assign/n_assign_ref.go @@ -5,28 +5,28 @@ import ( "github.com/z7zmey/php-parser/walker" ) -// AssignRef node -type AssignRef struct { +// Reference node +type Reference struct { Variable node.Node Expression node.Node } -// NewAssignRef node constuctor -func NewAssignRef(Variable node.Node, Expression node.Node) *AssignRef { - return &AssignRef{ +// NewReference node constuctor +func NewReference(Variable node.Node, Expression node.Node) *Reference { + return &Reference{ Variable, Expression, } } // Attributes returns node attributes as map -func (n *AssignRef) Attributes() map[string]interface{} { +func (n *Reference) Attributes() map[string]interface{} { return nil } // Walk traverses nodes // Walk is invoked recursively until v.EnterNode returns true -func (n *AssignRef) Walk(v walker.Visitor) { +func (n *Reference) Walk(v walker.Visitor) { if v.EnterNode(n) == false { return } diff --git a/node/expr/assign/t_assign_op_test.go b/node/expr/assign/t_assign_op_test.go index 684b8f7..eb4af84 100644 --- a/node/expr/assign/t_assign_op_test.go +++ b/node/expr/assign/t_assign_op_test.go @@ -29,13 +29,13 @@ func assertEqual(t *testing.T, expected interface{}, actual interface{}) { } } -func TestAssignRef(t *testing.T) { +func TestReference(t *testing.T) { src := `