From 47c51ea0223e539c907b776e772b61febcf9cc68 Mon Sep 17 00:00:00 2001 From: z7zmey Date: Thu, 5 Apr 2018 12:03:32 +0300 Subject: [PATCH] rename AssignRef to Reference --- node/expr/assign/n_assign_ref.go | 14 +++++++------- node/expr/assign/t_assign_op_test.go | 12 ++++++------ node/expr/assign/t_visitor_test.go | 2 +- php5/php5.go | 4 ++-- php5/php5.y | 4 ++-- php5/php5_test.go | 6 +++--- php7/php7.go | 2 +- php7/php7.y | 2 +- php7/php7_test.go | 2 +- printer/printer.go | 8 ++++---- printer/printer_test.go | 4 ++-- 11 files changed, 30 insertions(+), 30 deletions(-) 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 := `