diff --git a/node/expr/cast/n_cast_array.go b/node/expr/cast/n_cast_array.go index 4dd5ac1..56537a8 100644 --- a/node/expr/cast/n_cast_array.go +++ b/node/expr/cast/n_cast_array.go @@ -5,26 +5,26 @@ import ( "github.com/z7zmey/php-parser/walker" ) -// CastArray node -type CastArray struct { +// Array node +type Array struct { Expr node.Node } -// NewCastArray node constuctor -func NewCastArray(Expr node.Node) *CastArray { - return &CastArray{ +// NewArray node constructor +func NewArray(Expr node.Node) *Array { + return &Array{ Expr, } } // Attributes returns node attributes as map -func (n *CastArray) Attributes() map[string]interface{} { +func (n *Array) Attributes() map[string]interface{} { return nil } // Walk traverses nodes // Walk is invoked recursively until v.EnterNode returns true -func (n *CastArray) Walk(v walker.Visitor) { +func (n *Array) Walk(v walker.Visitor) { if v.EnterNode(n) == false { return } diff --git a/node/expr/cast/n_cast_bool.go b/node/expr/cast/n_cast_bool.go index bd90d28..f4c5988 100644 --- a/node/expr/cast/n_cast_bool.go +++ b/node/expr/cast/n_cast_bool.go @@ -5,26 +5,26 @@ import ( "github.com/z7zmey/php-parser/walker" ) -// CastBool node -type CastBool struct { +// Bool node +type Bool struct { Expr node.Node } -// NewCastBool node constuctor -func NewCastBool(Expr node.Node) *CastBool { - return &CastBool{ +// NewBool node constructor +func NewBool(Expr node.Node) *Bool { + return &Bool{ Expr, } } // Attributes returns node attributes as map -func (n *CastBool) Attributes() map[string]interface{} { +func (n *Bool) Attributes() map[string]interface{} { return nil } // Walk traverses nodes // Walk is invoked recursively until v.EnterNode returns true -func (n *CastBool) Walk(v walker.Visitor) { +func (n *Bool) Walk(v walker.Visitor) { if v.EnterNode(n) == false { return } diff --git a/node/expr/cast/n_cast_double.go b/node/expr/cast/n_cast_double.go index 0a9b193..addbbc7 100644 --- a/node/expr/cast/n_cast_double.go +++ b/node/expr/cast/n_cast_double.go @@ -5,26 +5,26 @@ import ( "github.com/z7zmey/php-parser/walker" ) -// CastDouble node -type CastDouble struct { +// Double node +type Double struct { Expr node.Node } -// NewCastDouble node constuctor -func NewCastDouble(Expr node.Node) *CastDouble { - return &CastDouble{ +// NewDouble node constructor +func NewDouble(Expr node.Node) *Double { + return &Double{ Expr, } } // Attributes returns node attributes as map -func (n *CastDouble) Attributes() map[string]interface{} { +func (n *Double) Attributes() map[string]interface{} { return nil } // Walk traverses nodes // Walk is invoked recursively until v.EnterNode returns true -func (n *CastDouble) Walk(v walker.Visitor) { +func (n *Double) Walk(v walker.Visitor) { if v.EnterNode(n) == false { return } diff --git a/node/expr/cast/n_cast_int.go b/node/expr/cast/n_cast_int.go index ad1ec2c..2d70e16 100644 --- a/node/expr/cast/n_cast_int.go +++ b/node/expr/cast/n_cast_int.go @@ -5,26 +5,26 @@ import ( "github.com/z7zmey/php-parser/walker" ) -// CastInt node -type CastInt struct { +// Int node +type Int struct { Expr node.Node } -// NewCastInt node constuctor -func NewCastInt(Expr node.Node) *CastInt { - return &CastInt{ +// NewInt node constructor +func NewInt(Expr node.Node) *Int { + return &Int{ Expr, } } // Attributes returns node attributes as map -func (n *CastInt) Attributes() map[string]interface{} { +func (n *Int) Attributes() map[string]interface{} { return nil } // Walk traverses nodes // Walk is invoked recursively until v.EnterNode returns true -func (n *CastInt) Walk(v walker.Visitor) { +func (n *Int) Walk(v walker.Visitor) { if v.EnterNode(n) == false { return } diff --git a/node/expr/cast/n_cast_object.go b/node/expr/cast/n_cast_object.go index 9a9ab51..b25b919 100644 --- a/node/expr/cast/n_cast_object.go +++ b/node/expr/cast/n_cast_object.go @@ -5,26 +5,26 @@ import ( "github.com/z7zmey/php-parser/walker" ) -// CastObject node -type CastObject struct { +// Object node +type Object struct { Expr node.Node } -// NewCastObject node constuctor -func NewCastObject(Expr node.Node) *CastObject { - return &CastObject{ +// NewObject node constructor +func NewObject(Expr node.Node) *Object { + return &Object{ Expr, } } // Attributes returns node attributes as map -func (n *CastObject) Attributes() map[string]interface{} { +func (n *Object) Attributes() map[string]interface{} { return nil } // Walk traverses nodes // Walk is invoked recursively until v.EnterNode returns true -func (n *CastObject) Walk(v walker.Visitor) { +func (n *Object) Walk(v walker.Visitor) { if v.EnterNode(n) == false { return } diff --git a/node/expr/cast/n_cast_string.go b/node/expr/cast/n_cast_string.go index 189bbb7..3fcd0d2 100644 --- a/node/expr/cast/n_cast_string.go +++ b/node/expr/cast/n_cast_string.go @@ -5,26 +5,26 @@ import ( "github.com/z7zmey/php-parser/walker" ) -// CastString node -type CastString struct { +// String node +type String struct { Expr node.Node } -// NewCastString node constuctor -func NewCastString(Expr node.Node) *CastString { - return &CastString{ +// NewString node constructor +func NewString(Expr node.Node) *String { + return &String{ Expr, } } // Attributes returns node attributes as map -func (n *CastString) Attributes() map[string]interface{} { +func (n *String) Attributes() map[string]interface{} { return nil } // Walk traverses nodes // Walk is invoked recursively until v.EnterNode returns true -func (n *CastString) Walk(v walker.Visitor) { +func (n *String) Walk(v walker.Visitor) { if v.EnterNode(n) == false { return } diff --git a/node/expr/cast/n_cast_unset.go b/node/expr/cast/n_cast_unset.go index b8ef862..a3dc011 100644 --- a/node/expr/cast/n_cast_unset.go +++ b/node/expr/cast/n_cast_unset.go @@ -5,26 +5,26 @@ import ( "github.com/z7zmey/php-parser/walker" ) -// CastUnset node -type CastUnset struct { +// Unset node +type Unset struct { Expr node.Node } -// NewCastUnset node constuctor -func NewCastUnset(Expr node.Node) *CastUnset { - return &CastUnset{ +// NewUnset node constructor +func NewUnset(Expr node.Node) *Unset { + return &Unset{ Expr, } } // Attributes returns node attributes as map -func (n *CastUnset) Attributes() map[string]interface{} { +func (n *Unset) Attributes() map[string]interface{} { return nil } // Walk traverses nodes // Walk is invoked recursively until v.EnterNode returns true -func (n *CastUnset) Walk(v walker.Visitor) { +func (n *Unset) Walk(v walker.Visitor) { if v.EnterNode(n) == false { return } diff --git a/node/expr/cast/t_cast_test.go b/node/expr/cast/t_cast_test.go index cdbc724..163d990 100644 --- a/node/expr/cast/t_cast_test.go +++ b/node/expr/cast/t_cast_test.go @@ -27,13 +27,13 @@ func assertEqual(t *testing.T, expected interface{}, actual interface{}) { } } -func TestCastArray(t *testing.T) { +func TestArray(t *testing.T) { src := `