add comments

This commit is contained in:
z7zmey 2018-01-11 19:33:25 +02:00
parent 0676e0cb5a
commit e814483f37
158 changed files with 771 additions and 2 deletions

View File

@ -1,10 +1,12 @@
package node package node
// Argument node
type Argument struct { type Argument struct {
Variadic bool Variadic bool // if ... before variable
Expr Node Expr Node // Exression
} }
// NewArgument node constuctor
func NewArgument(Expression Node, Variadic bool) *Argument { func NewArgument(Expression Node, Variadic bool) *Argument {
return &Argument{ return &Argument{
Variadic, Variadic,
@ -12,12 +14,15 @@ func NewArgument(Expression Node, Variadic bool) *Argument {
} }
} }
// Attributes returns node attributes as map
func (n *Argument) Attributes() map[string]interface{} { func (n *Argument) Attributes() map[string]interface{} {
return map[string]interface{}{ return map[string]interface{}{
"Variadic": n.Variadic, "Variadic": n.Variadic,
} }
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Argument) Walk(v Visitor) { func (n *Argument) Walk(v Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,20 +4,25 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Array node
type Array struct { type Array struct {
Items []node.Node Items []node.Node
} }
// NewArray node constuctor
func NewArray(Items []node.Node) *Array { func NewArray(Items []node.Node) *Array {
return &Array{ return &Array{
Items, Items,
} }
} }
// Attributes returns node attributes as map
func (n *Array) Attributes() map[string]interface{} { func (n *Array) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Array) Walk(v node.Visitor) { func (n *Array) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,11 +4,13 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// ArrayDimFetch node
type ArrayDimFetch struct { type ArrayDimFetch struct {
Variable node.Node Variable node.Node
Dim node.Node Dim node.Node
} }
// NewArrayDimFetch node constuctor
func NewArrayDimFetch(Variable node.Node, Dim node.Node) *ArrayDimFetch { func NewArrayDimFetch(Variable node.Node, Dim node.Node) *ArrayDimFetch {
return &ArrayDimFetch{ return &ArrayDimFetch{
Variable, Variable,
@ -16,10 +18,13 @@ func NewArrayDimFetch(Variable node.Node, Dim node.Node) *ArrayDimFetch {
} }
} }
// Attributes returns node attributes as map
func (n *ArrayDimFetch) Attributes() map[string]interface{} { func (n *ArrayDimFetch) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *ArrayDimFetch) Walk(v node.Visitor) { func (n *ArrayDimFetch) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,12 +4,14 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// ArrayItem node
type ArrayItem struct { type ArrayItem struct {
ByRef bool ByRef bool
Key node.Node Key node.Node
Val node.Node Val node.Node
} }
// NewArrayItem node constuctor
func NewArrayItem(Key node.Node, Val node.Node, ByRef bool) *ArrayItem { func NewArrayItem(Key node.Node, Val node.Node, ByRef bool) *ArrayItem {
return &ArrayItem{ return &ArrayItem{
ByRef, ByRef,
@ -18,12 +20,15 @@ func NewArrayItem(Key node.Node, Val node.Node, ByRef bool) *ArrayItem {
} }
} }
// Attributes returns node attributes as map
func (n *ArrayItem) Attributes() map[string]interface{} { func (n *ArrayItem) Attributes() map[string]interface{} {
return map[string]interface{}{ return map[string]interface{}{
"ByRef": n.ByRef, "ByRef": n.ByRef,
} }
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *ArrayItem) Walk(v node.Visitor) { func (n *ArrayItem) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Assign node
type Assign struct { type Assign struct {
AssignOp AssignOp
} }
// NewAssign node constuctor
func NewAssign(Variable node.Node, Expression node.Node) *Assign { func NewAssign(Variable node.Node, Expression node.Node) *Assign {
return &Assign{ return &Assign{
AssignOp{ AssignOp{
@ -17,10 +19,13 @@ func NewAssign(Variable node.Node, Expression node.Node) *Assign {
} }
} }
// Attributes returns node attributes as map
func (n *Assign) Attributes() map[string]interface{} { func (n *Assign) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Assign) Walk(v node.Visitor) { func (n *Assign) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,6 +4,7 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// AssignOp node
type AssignOp struct { type AssignOp struct {
Variable node.Node Variable node.Node
Expression node.Node Expression node.Node

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// AssignRef node
type AssignRef struct { type AssignRef struct {
AssignOp AssignOp
} }
// NewAssignRef node constuctor
func NewAssignRef(Variable node.Node, Expression node.Node) *AssignRef { func NewAssignRef(Variable node.Node, Expression node.Node) *AssignRef {
return &AssignRef{ return &AssignRef{
AssignOp{ AssignOp{
@ -17,10 +19,13 @@ func NewAssignRef(Variable node.Node, Expression node.Node) *AssignRef {
} }
} }
// Attributes returns node attributes as map
func (n *AssignRef) Attributes() map[string]interface{} { func (n *AssignRef) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *AssignRef) Walk(v node.Visitor) { func (n *AssignRef) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// BitwiseAnd node
type BitwiseAnd struct { type BitwiseAnd struct {
AssignOp AssignOp
} }
// NewBitwiseAnd node constuctor
func NewBitwiseAnd(Variable node.Node, Expression node.Node) *BitwiseAnd { func NewBitwiseAnd(Variable node.Node, Expression node.Node) *BitwiseAnd {
return &BitwiseAnd{ return &BitwiseAnd{
AssignOp{ AssignOp{
@ -17,10 +19,13 @@ func NewBitwiseAnd(Variable node.Node, Expression node.Node) *BitwiseAnd {
} }
} }
// Attributes returns node attributes as map
func (n *BitwiseAnd) Attributes() map[string]interface{} { func (n *BitwiseAnd) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *BitwiseAnd) Walk(v node.Visitor) { func (n *BitwiseAnd) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// BitwiseOr node
type BitwiseOr struct { type BitwiseOr struct {
AssignOp AssignOp
} }
// NewBitwiseOr node constuctor
func NewBitwiseOr(Variable node.Node, Expression node.Node) *BitwiseOr { func NewBitwiseOr(Variable node.Node, Expression node.Node) *BitwiseOr {
return &BitwiseOr{ return &BitwiseOr{
AssignOp{ AssignOp{
@ -17,10 +19,13 @@ func NewBitwiseOr(Variable node.Node, Expression node.Node) *BitwiseOr {
} }
} }
// Attributes returns node attributes as map
func (n *BitwiseOr) Attributes() map[string]interface{} { func (n *BitwiseOr) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *BitwiseOr) Walk(v node.Visitor) { func (n *BitwiseOr) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// BitwiseXor node
type BitwiseXor struct { type BitwiseXor struct {
AssignOp AssignOp
} }
// NewBitwiseXor node constuctor
func NewBitwiseXor(Variable node.Node, Expression node.Node) *BitwiseXor { func NewBitwiseXor(Variable node.Node, Expression node.Node) *BitwiseXor {
return &BitwiseXor{ return &BitwiseXor{
AssignOp{ AssignOp{
@ -17,10 +19,13 @@ func NewBitwiseXor(Variable node.Node, Expression node.Node) *BitwiseXor {
} }
} }
// Attributes returns node attributes as map
func (n *BitwiseXor) Attributes() map[string]interface{} { func (n *BitwiseXor) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *BitwiseXor) Walk(v node.Visitor) { func (n *BitwiseXor) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Concat node
type Concat struct { type Concat struct {
AssignOp AssignOp
} }
// NewConcat node constuctor
func NewConcat(Variable node.Node, Expression node.Node) *Concat { func NewConcat(Variable node.Node, Expression node.Node) *Concat {
return &Concat{ return &Concat{
AssignOp{ AssignOp{
@ -17,10 +19,13 @@ func NewConcat(Variable node.Node, Expression node.Node) *Concat {
} }
} }
// Attributes returns node attributes as map
func (n *Concat) Attributes() map[string]interface{} { func (n *Concat) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Concat) Walk(v node.Visitor) { func (n *Concat) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Div node
type Div struct { type Div struct {
AssignOp AssignOp
} }
// NewDiv node constuctor
func NewDiv(Variable node.Node, Expression node.Node) *Div { func NewDiv(Variable node.Node, Expression node.Node) *Div {
return &Div{ return &Div{
AssignOp{ AssignOp{
@ -17,10 +19,13 @@ func NewDiv(Variable node.Node, Expression node.Node) *Div {
} }
} }
// Attributes returns node attributes as map
func (n *Div) Attributes() map[string]interface{} { func (n *Div) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Div) Walk(v node.Visitor) { func (n *Div) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Minus node
type Minus struct { type Minus struct {
AssignOp AssignOp
} }
// NewMinus node constuctor
func NewMinus(Variable node.Node, Expression node.Node) *Minus { func NewMinus(Variable node.Node, Expression node.Node) *Minus {
return &Minus{ return &Minus{
AssignOp{ AssignOp{
@ -17,10 +19,13 @@ func NewMinus(Variable node.Node, Expression node.Node) *Minus {
} }
} }
// Attributes returns node attributes as map
func (n *Minus) Attributes() map[string]interface{} { func (n *Minus) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Minus) Walk(v node.Visitor) { func (n *Minus) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Mod node
type Mod struct { type Mod struct {
AssignOp AssignOp
} }
// NewMod node constuctor
func NewMod(Variable node.Node, Expression node.Node) *Mod { func NewMod(Variable node.Node, Expression node.Node) *Mod {
return &Mod{ return &Mod{
AssignOp{ AssignOp{
@ -17,10 +19,13 @@ func NewMod(Variable node.Node, Expression node.Node) *Mod {
} }
} }
// Attributes returns node attributes as map
func (n *Mod) Attributes() map[string]interface{} { func (n *Mod) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Mod) Walk(v node.Visitor) { func (n *Mod) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Mul node
type Mul struct { type Mul struct {
AssignOp AssignOp
} }
// NewMul node constuctor
func NewMul(Variable node.Node, Expression node.Node) *Mul { func NewMul(Variable node.Node, Expression node.Node) *Mul {
return &Mul{ return &Mul{
AssignOp{ AssignOp{
@ -17,10 +19,13 @@ func NewMul(Variable node.Node, Expression node.Node) *Mul {
} }
} }
// Attributes returns node attributes as map
func (n *Mul) Attributes() map[string]interface{} { func (n *Mul) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Mul) Walk(v node.Visitor) { func (n *Mul) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Plus node
type Plus struct { type Plus struct {
AssignOp AssignOp
} }
// NewPlus node constuctor
func NewPlus(Variable node.Node, Expression node.Node) *Plus { func NewPlus(Variable node.Node, Expression node.Node) *Plus {
return &Plus{ return &Plus{
AssignOp{ AssignOp{
@ -17,10 +19,13 @@ func NewPlus(Variable node.Node, Expression node.Node) *Plus {
} }
} }
// Attributes returns node attributes as map
func (n *Plus) Attributes() map[string]interface{} { func (n *Plus) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Plus) Walk(v node.Visitor) { func (n *Plus) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Pow node
type Pow struct { type Pow struct {
AssignOp AssignOp
} }
// NewPow node constuctor
func NewPow(Variable node.Node, Expression node.Node) *Pow { func NewPow(Variable node.Node, Expression node.Node) *Pow {
return &Pow{ return &Pow{
AssignOp{ AssignOp{
@ -17,10 +19,13 @@ func NewPow(Variable node.Node, Expression node.Node) *Pow {
} }
} }
// Attributes returns node attributes as map
func (n *Pow) Attributes() map[string]interface{} { func (n *Pow) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Pow) Walk(v node.Visitor) { func (n *Pow) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// ShiftLeft node
type ShiftLeft struct { type ShiftLeft struct {
AssignOp AssignOp
} }
// NewShiftLeft node constuctor
func NewShiftLeft(Variable node.Node, Expression node.Node) *ShiftLeft { func NewShiftLeft(Variable node.Node, Expression node.Node) *ShiftLeft {
return &ShiftLeft{ return &ShiftLeft{
AssignOp{ AssignOp{
@ -17,10 +19,13 @@ func NewShiftLeft(Variable node.Node, Expression node.Node) *ShiftLeft {
} }
} }
// Attributes returns node attributes as map
func (n *ShiftLeft) Attributes() map[string]interface{} { func (n *ShiftLeft) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *ShiftLeft) Walk(v node.Visitor) { func (n *ShiftLeft) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// ShiftRight node
type ShiftRight struct { type ShiftRight struct {
AssignOp AssignOp
} }
// NewShiftRight node constuctor
func NewShiftRight(Variable node.Node, Expression node.Node) *ShiftRight { func NewShiftRight(Variable node.Node, Expression node.Node) *ShiftRight {
return &ShiftRight{ return &ShiftRight{
AssignOp{ AssignOp{
@ -17,10 +19,13 @@ func NewShiftRight(Variable node.Node, Expression node.Node) *ShiftRight {
} }
} }
// Attributes returns node attributes as map
func (n *ShiftRight) Attributes() map[string]interface{} { func (n *ShiftRight) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *ShiftRight) Walk(v node.Visitor) { func (n *ShiftRight) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,6 +4,7 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// BinaryOp node
type BinaryOp struct { type BinaryOp struct {
Left node.Node Left node.Node
Right node.Node Right node.Node

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// BitwiseAnd node
type BitwiseAnd struct { type BitwiseAnd struct {
BinaryOp BinaryOp
} }
// NewBitwiseAnd node constuctor
func NewBitwiseAnd(Variable node.Node, Expression node.Node) *BitwiseAnd { func NewBitwiseAnd(Variable node.Node, Expression node.Node) *BitwiseAnd {
return &BitwiseAnd{ return &BitwiseAnd{
BinaryOp{ BinaryOp{
@ -17,10 +19,13 @@ func NewBitwiseAnd(Variable node.Node, Expression node.Node) *BitwiseAnd {
} }
} }
// Attributes returns node attributes as map
func (n *BitwiseAnd) Attributes() map[string]interface{} { func (n *BitwiseAnd) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *BitwiseAnd) Walk(v node.Visitor) { func (n *BitwiseAnd) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// BitwiseOr node
type BitwiseOr struct { type BitwiseOr struct {
BinaryOp BinaryOp
} }
// NewBitwiseOr node constuctor
func NewBitwiseOr(Variable node.Node, Expression node.Node) *BitwiseOr { func NewBitwiseOr(Variable node.Node, Expression node.Node) *BitwiseOr {
return &BitwiseOr{ return &BitwiseOr{
BinaryOp{ BinaryOp{
@ -17,10 +19,13 @@ func NewBitwiseOr(Variable node.Node, Expression node.Node) *BitwiseOr {
} }
} }
// Attributes returns node attributes as map
func (n *BitwiseOr) Attributes() map[string]interface{} { func (n *BitwiseOr) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *BitwiseOr) Walk(v node.Visitor) { func (n *BitwiseOr) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// BitwiseXor node
type BitwiseXor struct { type BitwiseXor struct {
BinaryOp BinaryOp
} }
// NewBitwiseXor node constuctor
func NewBitwiseXor(Variable node.Node, Expression node.Node) *BitwiseXor { func NewBitwiseXor(Variable node.Node, Expression node.Node) *BitwiseXor {
return &BitwiseXor{ return &BitwiseXor{
BinaryOp{ BinaryOp{
@ -17,10 +19,13 @@ func NewBitwiseXor(Variable node.Node, Expression node.Node) *BitwiseXor {
} }
} }
// Attributes returns node attributes as map
func (n *BitwiseXor) Attributes() map[string]interface{} { func (n *BitwiseXor) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *BitwiseXor) Walk(v node.Visitor) { func (n *BitwiseXor) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// BooleanAnd node
type BooleanAnd struct { type BooleanAnd struct {
BinaryOp BinaryOp
} }
// NewBooleanAnd node constuctor
func NewBooleanAnd(Variable node.Node, Expression node.Node) *BooleanAnd { func NewBooleanAnd(Variable node.Node, Expression node.Node) *BooleanAnd {
return &BooleanAnd{ return &BooleanAnd{
BinaryOp{ BinaryOp{
@ -17,10 +19,13 @@ func NewBooleanAnd(Variable node.Node, Expression node.Node) *BooleanAnd {
} }
} }
// Attributes returns node attributes as map
func (n *BooleanAnd) Attributes() map[string]interface{} { func (n *BooleanAnd) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *BooleanAnd) Walk(v node.Visitor) { func (n *BooleanAnd) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// BooleanOr node
type BooleanOr struct { type BooleanOr struct {
BinaryOp BinaryOp
} }
// NewBooleanOr node constuctor
func NewBooleanOr(Variable node.Node, Expression node.Node) *BooleanOr { func NewBooleanOr(Variable node.Node, Expression node.Node) *BooleanOr {
return &BooleanOr{ return &BooleanOr{
BinaryOp{ BinaryOp{
@ -17,10 +19,13 @@ func NewBooleanOr(Variable node.Node, Expression node.Node) *BooleanOr {
} }
} }
// Attributes returns node attributes as map
func (n *BooleanOr) Attributes() map[string]interface{} { func (n *BooleanOr) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *BooleanOr) Walk(v node.Visitor) { func (n *BooleanOr) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Coalesce node
type Coalesce struct { type Coalesce struct {
BinaryOp BinaryOp
} }
// NewCoalesce node constuctor
func NewCoalesce(Variable node.Node, Expression node.Node) *Coalesce { func NewCoalesce(Variable node.Node, Expression node.Node) *Coalesce {
return &Coalesce{ return &Coalesce{
BinaryOp{ BinaryOp{
@ -17,10 +19,13 @@ func NewCoalesce(Variable node.Node, Expression node.Node) *Coalesce {
} }
} }
// Attributes returns node attributes as map
func (n *Coalesce) Attributes() map[string]interface{} { func (n *Coalesce) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Coalesce) Walk(v node.Visitor) { func (n *Coalesce) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Concat node
type Concat struct { type Concat struct {
BinaryOp BinaryOp
} }
// NewConcat node constuctor
func NewConcat(Variable node.Node, Expression node.Node) *Concat { func NewConcat(Variable node.Node, Expression node.Node) *Concat {
return &Concat{ return &Concat{
BinaryOp{ BinaryOp{
@ -17,10 +19,13 @@ func NewConcat(Variable node.Node, Expression node.Node) *Concat {
} }
} }
// Attributes returns node attributes as map
func (n *Concat) Attributes() map[string]interface{} { func (n *Concat) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Concat) Walk(v node.Visitor) { func (n *Concat) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Div node
type Div struct { type Div struct {
BinaryOp BinaryOp
} }
// NewDiv node constuctor
func NewDiv(Variable node.Node, Expression node.Node) *Div { func NewDiv(Variable node.Node, Expression node.Node) *Div {
return &Div{ return &Div{
BinaryOp{ BinaryOp{
@ -17,10 +19,13 @@ func NewDiv(Variable node.Node, Expression node.Node) *Div {
} }
} }
// Attributes returns node attributes as map
func (n *Div) Attributes() map[string]interface{} { func (n *Div) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Div) Walk(v node.Visitor) { func (n *Div) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Equal node
type Equal struct { type Equal struct {
BinaryOp BinaryOp
} }
// NewEqual node constuctor
func NewEqual(Variable node.Node, Expression node.Node) *Equal { func NewEqual(Variable node.Node, Expression node.Node) *Equal {
return &Equal{ return &Equal{
BinaryOp{ BinaryOp{
@ -17,10 +19,13 @@ func NewEqual(Variable node.Node, Expression node.Node) *Equal {
} }
} }
// Attributes returns node attributes as map
func (n *Equal) Attributes() map[string]interface{} { func (n *Equal) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Equal) Walk(v node.Visitor) { func (n *Equal) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Greater node
type Greater struct { type Greater struct {
BinaryOp BinaryOp
} }
// NewGreater node constuctor
func NewGreater(Variable node.Node, Expression node.Node) *Greater { func NewGreater(Variable node.Node, Expression node.Node) *Greater {
return &Greater{ return &Greater{
BinaryOp{ BinaryOp{
@ -17,10 +19,13 @@ func NewGreater(Variable node.Node, Expression node.Node) *Greater {
} }
} }
// Attributes returns node attributes as map
func (n *Greater) Attributes() map[string]interface{} { func (n *Greater) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Greater) Walk(v node.Visitor) { func (n *Greater) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// GreaterOrEqual node
type GreaterOrEqual struct { type GreaterOrEqual struct {
BinaryOp BinaryOp
} }
// NewGreaterOrEqual node constuctor
func NewGreaterOrEqual(Variable node.Node, Expression node.Node) *GreaterOrEqual { func NewGreaterOrEqual(Variable node.Node, Expression node.Node) *GreaterOrEqual {
return &GreaterOrEqual{ return &GreaterOrEqual{
BinaryOp{ BinaryOp{
@ -17,10 +19,13 @@ func NewGreaterOrEqual(Variable node.Node, Expression node.Node) *GreaterOrEqual
} }
} }
// Attributes returns node attributes as map
func (n *GreaterOrEqual) Attributes() map[string]interface{} { func (n *GreaterOrEqual) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *GreaterOrEqual) Walk(v node.Visitor) { func (n *GreaterOrEqual) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Identical node
type Identical struct { type Identical struct {
BinaryOp BinaryOp
} }
// NewIdentical node constuctor
func NewIdentical(Variable node.Node, Expression node.Node) *Identical { func NewIdentical(Variable node.Node, Expression node.Node) *Identical {
return &Identical{ return &Identical{
BinaryOp{ BinaryOp{
@ -17,10 +19,13 @@ func NewIdentical(Variable node.Node, Expression node.Node) *Identical {
} }
} }
// Attributes returns node attributes as map
func (n *Identical) Attributes() map[string]interface{} { func (n *Identical) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Identical) Walk(v node.Visitor) { func (n *Identical) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// LogicalAnd node
type LogicalAnd struct { type LogicalAnd struct {
BinaryOp BinaryOp
} }
// NewLogicalAnd node constuctor
func NewLogicalAnd(Variable node.Node, Expression node.Node) *LogicalAnd { func NewLogicalAnd(Variable node.Node, Expression node.Node) *LogicalAnd {
return &LogicalAnd{ return &LogicalAnd{
BinaryOp{ BinaryOp{
@ -17,10 +19,13 @@ func NewLogicalAnd(Variable node.Node, Expression node.Node) *LogicalAnd {
} }
} }
// Attributes returns node attributes as map
func (n *LogicalAnd) Attributes() map[string]interface{} { func (n *LogicalAnd) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *LogicalAnd) Walk(v node.Visitor) { func (n *LogicalAnd) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// LogicalOr node
type LogicalOr struct { type LogicalOr struct {
BinaryOp BinaryOp
} }
// NewLogicalOr node constuctor
func NewLogicalOr(Variable node.Node, Expression node.Node) *LogicalOr { func NewLogicalOr(Variable node.Node, Expression node.Node) *LogicalOr {
return &LogicalOr{ return &LogicalOr{
BinaryOp{ BinaryOp{
@ -17,10 +19,13 @@ func NewLogicalOr(Variable node.Node, Expression node.Node) *LogicalOr {
} }
} }
// Attributes returns node attributes as map
func (n *LogicalOr) Attributes() map[string]interface{} { func (n *LogicalOr) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *LogicalOr) Walk(v node.Visitor) { func (n *LogicalOr) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// LogicalXor node
type LogicalXor struct { type LogicalXor struct {
BinaryOp BinaryOp
} }
// NewLogicalXor node constuctor
func NewLogicalXor(Variable node.Node, Expression node.Node) *LogicalXor { func NewLogicalXor(Variable node.Node, Expression node.Node) *LogicalXor {
return &LogicalXor{ return &LogicalXor{
BinaryOp{ BinaryOp{
@ -17,10 +19,13 @@ func NewLogicalXor(Variable node.Node, Expression node.Node) *LogicalXor {
} }
} }
// Attributes returns node attributes as map
func (n *LogicalXor) Attributes() map[string]interface{} { func (n *LogicalXor) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *LogicalXor) Walk(v node.Visitor) { func (n *LogicalXor) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Minus node
type Minus struct { type Minus struct {
BinaryOp BinaryOp
} }
// NewMinus node constuctor
func NewMinus(Variable node.Node, Expression node.Node) *Minus { func NewMinus(Variable node.Node, Expression node.Node) *Minus {
return &Minus{ return &Minus{
BinaryOp{ BinaryOp{
@ -17,10 +19,13 @@ func NewMinus(Variable node.Node, Expression node.Node) *Minus {
} }
} }
// Attributes returns node attributes as map
func (n *Minus) Attributes() map[string]interface{} { func (n *Minus) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Minus) Walk(v node.Visitor) { func (n *Minus) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Mod node
type Mod struct { type Mod struct {
BinaryOp BinaryOp
} }
// NewMod node constuctor
func NewMod(Variable node.Node, Expression node.Node) *Mod { func NewMod(Variable node.Node, Expression node.Node) *Mod {
return &Mod{ return &Mod{
BinaryOp{ BinaryOp{
@ -17,10 +19,13 @@ func NewMod(Variable node.Node, Expression node.Node) *Mod {
} }
} }
// Attributes returns node attributes as map
func (n *Mod) Attributes() map[string]interface{} { func (n *Mod) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Mod) Walk(v node.Visitor) { func (n *Mod) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Mul node
type Mul struct { type Mul struct {
BinaryOp BinaryOp
} }
// NewMul node constuctor
func NewMul(Variable node.Node, Expression node.Node) *Mul { func NewMul(Variable node.Node, Expression node.Node) *Mul {
return &Mul{ return &Mul{
BinaryOp{ BinaryOp{
@ -17,10 +19,13 @@ func NewMul(Variable node.Node, Expression node.Node) *Mul {
} }
} }
// Attributes returns node attributes as map
func (n *Mul) Attributes() map[string]interface{} { func (n *Mul) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Mul) Walk(v node.Visitor) { func (n *Mul) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// NotEqual node
type NotEqual struct { type NotEqual struct {
BinaryOp BinaryOp
} }
// NewNotEqual node constuctor
func NewNotEqual(Variable node.Node, Expression node.Node) *NotEqual { func NewNotEqual(Variable node.Node, Expression node.Node) *NotEqual {
return &NotEqual{ return &NotEqual{
BinaryOp{ BinaryOp{
@ -17,10 +19,13 @@ func NewNotEqual(Variable node.Node, Expression node.Node) *NotEqual {
} }
} }
// Attributes returns node attributes as map
func (n *NotEqual) Attributes() map[string]interface{} { func (n *NotEqual) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *NotEqual) Walk(v node.Visitor) { func (n *NotEqual) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// NotIdentical node
type NotIdentical struct { type NotIdentical struct {
BinaryOp BinaryOp
} }
// NewNotIdentical node constuctor
func NewNotIdentical(Variable node.Node, Expression node.Node) *NotIdentical { func NewNotIdentical(Variable node.Node, Expression node.Node) *NotIdentical {
return &NotIdentical{ return &NotIdentical{
BinaryOp{ BinaryOp{
@ -17,10 +19,13 @@ func NewNotIdentical(Variable node.Node, Expression node.Node) *NotIdentical {
} }
} }
// Attributes returns node attributes as map
func (n *NotIdentical) Attributes() map[string]interface{} { func (n *NotIdentical) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *NotIdentical) Walk(v node.Visitor) { func (n *NotIdentical) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Plus node
type Plus struct { type Plus struct {
BinaryOp BinaryOp
} }
// NewPlus node constuctor
func NewPlus(Variable node.Node, Expression node.Node) *Plus { func NewPlus(Variable node.Node, Expression node.Node) *Plus {
return &Plus{ return &Plus{
BinaryOp{ BinaryOp{
@ -17,10 +19,13 @@ func NewPlus(Variable node.Node, Expression node.Node) *Plus {
} }
} }
// Attributes returns node attributes as map
func (n *Plus) Attributes() map[string]interface{} { func (n *Plus) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Plus) Walk(v node.Visitor) { func (n *Plus) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Pow node
type Pow struct { type Pow struct {
BinaryOp BinaryOp
} }
// NewPow node constuctor
func NewPow(Variable node.Node, Expression node.Node) *Pow { func NewPow(Variable node.Node, Expression node.Node) *Pow {
return &Pow{ return &Pow{
BinaryOp{ BinaryOp{
@ -17,10 +19,13 @@ func NewPow(Variable node.Node, Expression node.Node) *Pow {
} }
} }
// Attributes returns node attributes as map
func (n *Pow) Attributes() map[string]interface{} { func (n *Pow) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Pow) Walk(v node.Visitor) { func (n *Pow) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// ShiftLeft node
type ShiftLeft struct { type ShiftLeft struct {
BinaryOp BinaryOp
} }
// NewShiftLeft node constuctor
func NewShiftLeft(Variable node.Node, Expression node.Node) *ShiftLeft { func NewShiftLeft(Variable node.Node, Expression node.Node) *ShiftLeft {
return &ShiftLeft{ return &ShiftLeft{
BinaryOp{ BinaryOp{
@ -17,10 +19,13 @@ func NewShiftLeft(Variable node.Node, Expression node.Node) *ShiftLeft {
} }
} }
// Attributes returns node attributes as map
func (n *ShiftLeft) Attributes() map[string]interface{} { func (n *ShiftLeft) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *ShiftLeft) Walk(v node.Visitor) { func (n *ShiftLeft) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// ShiftRight node
type ShiftRight struct { type ShiftRight struct {
BinaryOp BinaryOp
} }
// NewShiftRight node constuctor
func NewShiftRight(Variable node.Node, Expression node.Node) *ShiftRight { func NewShiftRight(Variable node.Node, Expression node.Node) *ShiftRight {
return &ShiftRight{ return &ShiftRight{
BinaryOp{ BinaryOp{
@ -17,10 +19,13 @@ func NewShiftRight(Variable node.Node, Expression node.Node) *ShiftRight {
} }
} }
// Attributes returns node attributes as map
func (n *ShiftRight) Attributes() map[string]interface{} { func (n *ShiftRight) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *ShiftRight) Walk(v node.Visitor) { func (n *ShiftRight) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Smaller node
type Smaller struct { type Smaller struct {
BinaryOp BinaryOp
} }
// NewSmaller node constuctor
func NewSmaller(Variable node.Node, Expression node.Node) *Smaller { func NewSmaller(Variable node.Node, Expression node.Node) *Smaller {
return &Smaller{ return &Smaller{
BinaryOp{ BinaryOp{
@ -17,10 +19,13 @@ func NewSmaller(Variable node.Node, Expression node.Node) *Smaller {
} }
} }
// Attributes returns node attributes as map
func (n *Smaller) Attributes() map[string]interface{} { func (n *Smaller) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Smaller) Walk(v node.Visitor) { func (n *Smaller) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// SmallerOrEqual node
type SmallerOrEqual struct { type SmallerOrEqual struct {
BinaryOp BinaryOp
} }
// NewSmallerOrEqual node constuctor
func NewSmallerOrEqual(Variable node.Node, Expression node.Node) *SmallerOrEqual { func NewSmallerOrEqual(Variable node.Node, Expression node.Node) *SmallerOrEqual {
return &SmallerOrEqual{ return &SmallerOrEqual{
BinaryOp{ BinaryOp{
@ -17,10 +19,13 @@ func NewSmallerOrEqual(Variable node.Node, Expression node.Node) *SmallerOrEqual
} }
} }
// Attributes returns node attributes as map
func (n *SmallerOrEqual) Attributes() map[string]interface{} { func (n *SmallerOrEqual) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *SmallerOrEqual) Walk(v node.Visitor) { func (n *SmallerOrEqual) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Spaceship node
type Spaceship struct { type Spaceship struct {
BinaryOp BinaryOp
} }
// NewSpaceship node constuctor
func NewSpaceship(Variable node.Node, Expression node.Node) *Spaceship { func NewSpaceship(Variable node.Node, Expression node.Node) *Spaceship {
return &Spaceship{ return &Spaceship{
BinaryOp{ BinaryOp{
@ -17,10 +19,13 @@ func NewSpaceship(Variable node.Node, Expression node.Node) *Spaceship {
} }
} }
// Attributes returns node attributes as map
func (n *Spaceship) Attributes() map[string]interface{} { func (n *Spaceship) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Spaceship) Walk(v node.Visitor) { func (n *Spaceship) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,20 +4,25 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// BitwiseNot node
type BitwiseNot struct { type BitwiseNot struct {
Expr node.Node Expr node.Node
} }
// NewBitwiseNot node constuctor
func NewBitwiseNot(Expression node.Node) *BitwiseNot { func NewBitwiseNot(Expression node.Node) *BitwiseNot {
return &BitwiseNot{ return &BitwiseNot{
Expression, Expression,
} }
} }
// Attributes returns node attributes as map
func (n *BitwiseNot) Attributes() map[string]interface{} { func (n *BitwiseNot) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *BitwiseNot) Walk(v node.Visitor) { func (n *BitwiseNot) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,20 +4,25 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// BooleanNot node
type BooleanNot struct { type BooleanNot struct {
Expr node.Node Expr node.Node
} }
// NewBooleanNot node constuctor
func NewBooleanNot(Expression node.Node) *BooleanNot { func NewBooleanNot(Expression node.Node) *BooleanNot {
return &BooleanNot{ return &BooleanNot{
Expression, Expression,
} }
} }
// Attributes returns node attributes as map
func (n *BooleanNot) Attributes() map[string]interface{} { func (n *BooleanNot) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *BooleanNot) Walk(v node.Visitor) { func (n *BooleanNot) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,6 +4,7 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Cast node
type Cast struct { type Cast struct {
Expr node.Node Expr node.Node
} }

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// CastArray node
type CastArray struct { type CastArray struct {
Cast Cast
} }
// NewCastArray node constuctor
func NewCastArray(Expr node.Node) *CastArray { func NewCastArray(Expr node.Node) *CastArray {
return &CastArray{ return &CastArray{
Cast{ Cast{
@ -16,10 +18,13 @@ func NewCastArray(Expr node.Node) *CastArray {
} }
} }
// Attributes returns node attributes as map
func (n *CastArray) Attributes() map[string]interface{} { func (n *CastArray) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *CastArray) Walk(v node.Visitor) { func (n *CastArray) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// CastBool node
type CastBool struct { type CastBool struct {
Cast Cast
} }
// NewCastBool node constuctor
func NewCastBool(Expr node.Node) *CastBool { func NewCastBool(Expr node.Node) *CastBool {
return &CastBool{ return &CastBool{
Cast{ Cast{
@ -16,10 +18,13 @@ func NewCastBool(Expr node.Node) *CastBool {
} }
} }
// Attributes returns node attributes as map
func (n *CastBool) Attributes() map[string]interface{} { func (n *CastBool) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *CastBool) Walk(v node.Visitor) { func (n *CastBool) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// CastDouble node
type CastDouble struct { type CastDouble struct {
Cast Cast
} }
// NewCastDouble node constuctor
func NewCastDouble(Expr node.Node) *CastDouble { func NewCastDouble(Expr node.Node) *CastDouble {
return &CastDouble{ return &CastDouble{
Cast{ Cast{
@ -16,10 +18,13 @@ func NewCastDouble(Expr node.Node) *CastDouble {
} }
} }
// Attributes returns node attributes as map
func (n *CastDouble) Attributes() map[string]interface{} { func (n *CastDouble) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *CastDouble) Walk(v node.Visitor) { func (n *CastDouble) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// CastInt node
type CastInt struct { type CastInt struct {
Cast Cast
} }
// NewCastInt node constuctor
func NewCastInt(Expr node.Node) *CastInt { func NewCastInt(Expr node.Node) *CastInt {
return &CastInt{ return &CastInt{
Cast{ Cast{
@ -16,10 +18,13 @@ func NewCastInt(Expr node.Node) *CastInt {
} }
} }
// Attributes returns node attributes as map
func (n *CastInt) Attributes() map[string]interface{} { func (n *CastInt) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *CastInt) Walk(v node.Visitor) { func (n *CastInt) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// CastObject node
type CastObject struct { type CastObject struct {
Cast Cast
} }
// NewCastObject node constuctor
func NewCastObject(Expr node.Node) *CastObject { func NewCastObject(Expr node.Node) *CastObject {
return &CastObject{ return &CastObject{
Cast{ Cast{
@ -16,10 +18,13 @@ func NewCastObject(Expr node.Node) *CastObject {
} }
} }
// Attributes returns node attributes as map
func (n *CastObject) Attributes() map[string]interface{} { func (n *CastObject) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *CastObject) Walk(v node.Visitor) { func (n *CastObject) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// CastString node
type CastString struct { type CastString struct {
Cast Cast
} }
// NewCastString node constuctor
func NewCastString(Expr node.Node) *CastString { func NewCastString(Expr node.Node) *CastString {
return &CastString{ return &CastString{
Cast{ Cast{
@ -16,10 +18,13 @@ func NewCastString(Expr node.Node) *CastString {
} }
} }
// Attributes returns node attributes as map
func (n *CastString) Attributes() map[string]interface{} { func (n *CastString) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *CastString) Walk(v node.Visitor) { func (n *CastString) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// CastUnset node
type CastUnset struct { type CastUnset struct {
Cast Cast
} }
// NewCastUnset node constuctor
func NewCastUnset(Expr node.Node) *CastUnset { func NewCastUnset(Expr node.Node) *CastUnset {
return &CastUnset{ return &CastUnset{
Cast{ Cast{
@ -16,10 +18,13 @@ func NewCastUnset(Expr node.Node) *CastUnset {
} }
} }
// Attributes returns node attributes as map
func (n *CastUnset) Attributes() map[string]interface{} { func (n *CastUnset) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *CastUnset) Walk(v node.Visitor) { func (n *CastUnset) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,11 +4,13 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// ClassConstFetch node
type ClassConstFetch struct { type ClassConstFetch struct {
Class node.Node Class node.Node
ConstantName node.Node ConstantName node.Node
} }
// NewClassConstFetch node constuctor
func NewClassConstFetch(Class node.Node, ConstantName node.Node) *ClassConstFetch { func NewClassConstFetch(Class node.Node, ConstantName node.Node) *ClassConstFetch {
return &ClassConstFetch{ return &ClassConstFetch{
Class, Class,
@ -16,10 +18,13 @@ func NewClassConstFetch(Class node.Node, ConstantName node.Node) *ClassConstFetc
} }
} }
// Attributes returns node attributes as map
func (n *ClassConstFetch) Attributes() map[string]interface{} { func (n *ClassConstFetch) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *ClassConstFetch) Walk(v node.Visitor) { func (n *ClassConstFetch) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,20 +4,25 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Clone node
type Clone struct { type Clone struct {
Expr node.Node Expr node.Node
} }
// NewClone node constuctor
func NewClone(Expression node.Node) *Clone { func NewClone(Expression node.Node) *Clone {
return &Clone{ return &Clone{
Expression, Expression,
} }
} }
// Attributes returns node attributes as map
func (n *Clone) Attributes() map[string]interface{} { func (n *Clone) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Clone) Walk(v node.Visitor) { func (n *Clone) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,6 +4,7 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Closure node
type Closure struct { type Closure struct {
ReturnsRef bool ReturnsRef bool
Static bool Static bool
@ -14,6 +15,7 @@ type Closure struct {
Stmts []node.Node Stmts []node.Node
} }
// NewClosure node constuctor
func NewClosure(Params []node.Node, Uses []node.Node, ReturnType node.Node, Stmts []node.Node, Static bool, ReturnsRef bool, PhpDocComment string) *Closure { func NewClosure(Params []node.Node, Uses []node.Node, ReturnType node.Node, Stmts []node.Node, Static bool, ReturnsRef bool, PhpDocComment string) *Closure {
return &Closure{ return &Closure{
ReturnsRef, ReturnsRef,
@ -26,6 +28,7 @@ func NewClosure(Params []node.Node, Uses []node.Node, ReturnType node.Node, Stmt
} }
} }
// Attributes returns node attributes as map
func (n *Closure) Attributes() map[string]interface{} { func (n *Closure) Attributes() map[string]interface{} {
return map[string]interface{}{ return map[string]interface{}{
"ReturnsRef": n.ReturnsRef, "ReturnsRef": n.ReturnsRef,
@ -34,6 +37,8 @@ func (n *Closure) Attributes() map[string]interface{} {
} }
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Closure) Walk(v node.Visitor) { func (n *Closure) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,11 +4,13 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// ClusureUse node
type ClusureUse struct { type ClusureUse struct {
ByRef bool ByRef bool
Variable node.Node Variable node.Node
} }
// NewClusureUse node constuctor
func NewClusureUse(Variable node.Node, ByRef bool) *ClusureUse { func NewClusureUse(Variable node.Node, ByRef bool) *ClusureUse {
return &ClusureUse{ return &ClusureUse{
ByRef, ByRef,
@ -16,12 +18,15 @@ func NewClusureUse(Variable node.Node, ByRef bool) *ClusureUse {
} }
} }
// Attributes returns node attributes as map
func (n *ClusureUse) Attributes() map[string]interface{} { func (n *ClusureUse) Attributes() map[string]interface{} {
return map[string]interface{}{ return map[string]interface{}{
"ByRef": n.ByRef, "ByRef": n.ByRef,
} }
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *ClusureUse) Walk(v node.Visitor) { func (n *ClusureUse) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,20 +4,25 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// ConstFetch node
type ConstFetch struct { type ConstFetch struct {
Constant node.Node Constant node.Node
} }
// NewConstFetch node constuctor
func NewConstFetch(Constant node.Node) *ConstFetch { func NewConstFetch(Constant node.Node) *ConstFetch {
return &ConstFetch{ return &ConstFetch{
Constant, Constant,
} }
} }
// Attributes returns node attributes as map
func (n *ConstFetch) Attributes() map[string]interface{} { func (n *ConstFetch) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *ConstFetch) Walk(v node.Visitor) { func (n *ConstFetch) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,20 +4,25 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Empty node
type Empty struct { type Empty struct {
Expr node.Node Expr node.Node
} }
// NewEmpty node constuctor
func NewEmpty(Expression node.Node) *Empty { func NewEmpty(Expression node.Node) *Empty {
return &Empty{ return &Empty{
Expression, Expression,
} }
} }
// Attributes returns node attributes as map
func (n *Empty) Attributes() map[string]interface{} { func (n *Empty) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Empty) Walk(v node.Visitor) { func (n *Empty) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,20 +4,25 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// ErrorSuppress node
type ErrorSuppress struct { type ErrorSuppress struct {
Expr node.Node Expr node.Node
} }
// NewErrorSuppress node constuctor
func NewErrorSuppress(Expression node.Node) *ErrorSuppress { func NewErrorSuppress(Expression node.Node) *ErrorSuppress {
return &ErrorSuppress{ return &ErrorSuppress{
Expression, Expression,
} }
} }
// Attributes returns node attributes as map
func (n *ErrorSuppress) Attributes() map[string]interface{} { func (n *ErrorSuppress) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *ErrorSuppress) Walk(v node.Visitor) { func (n *ErrorSuppress) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,20 +4,25 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Eval node
type Eval struct { type Eval struct {
Expr node.Node Expr node.Node
} }
// NewEval node constuctor
func NewEval(Expression node.Node) *Eval { func NewEval(Expression node.Node) *Eval {
return &Eval{ return &Eval{
Expression, Expression,
} }
} }
// Attributes returns node attributes as map
func (n *Eval) Attributes() map[string]interface{} { func (n *Eval) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Eval) Walk(v node.Visitor) { func (n *Eval) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,11 +4,13 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Exit node
type Exit struct { type Exit struct {
Expr node.Node Expr node.Node
IsDie bool IsDie bool
} }
// NewExit node constuctor
func NewExit(Expr node.Node, IsDie bool) *Exit { func NewExit(Expr node.Node, IsDie bool) *Exit {
return &Exit{ return &Exit{
Expr, Expr,
@ -16,12 +18,15 @@ func NewExit(Expr node.Node, IsDie bool) *Exit {
} }
} }
// Attributes returns node attributes as map
func (n *Exit) Attributes() map[string]interface{} { func (n *Exit) Attributes() map[string]interface{} {
return map[string]interface{}{ return map[string]interface{}{
"IsDie": n.IsDie, "IsDie": n.IsDie,
} }
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Exit) Walk(v node.Visitor) { func (n *Exit) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,11 +4,13 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// FunctionCall node
type FunctionCall struct { type FunctionCall struct {
Function node.Node Function node.Node
Arguments []node.Node Arguments []node.Node
} }
// NewFunctionCall node constuctor
func NewFunctionCall(Function node.Node, Arguments []node.Node) *FunctionCall { func NewFunctionCall(Function node.Node, Arguments []node.Node) *FunctionCall {
return &FunctionCall{ return &FunctionCall{
Function, Function,
@ -16,10 +18,13 @@ func NewFunctionCall(Function node.Node, Arguments []node.Node) *FunctionCall {
} }
} }
// Attributes returns node attributes as map
func (n *FunctionCall) Attributes() map[string]interface{} { func (n *FunctionCall) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *FunctionCall) Walk(v node.Visitor) { func (n *FunctionCall) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,20 +4,25 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Include node
type Include struct { type Include struct {
Expr node.Node Expr node.Node
} }
// NewInclude node constuctor
func NewInclude(Expression node.Node) *Include { func NewInclude(Expression node.Node) *Include {
return &Include{ return &Include{
Expression, Expression,
} }
} }
// Attributes returns node attributes as map
func (n *Include) Attributes() map[string]interface{} { func (n *Include) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Include) Walk(v node.Visitor) { func (n *Include) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,20 +4,25 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// IncludeOnce node
type IncludeOnce struct { type IncludeOnce struct {
Expr node.Node Expr node.Node
} }
// NewIncludeOnce node constuctor
func NewIncludeOnce(Expression node.Node) *IncludeOnce { func NewIncludeOnce(Expression node.Node) *IncludeOnce {
return &IncludeOnce{ return &IncludeOnce{
Expression, Expression,
} }
} }
// Attributes returns node attributes as map
func (n *IncludeOnce) Attributes() map[string]interface{} { func (n *IncludeOnce) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *IncludeOnce) Walk(v node.Visitor) { func (n *IncludeOnce) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,11 +4,13 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// InstanceOf node
type InstanceOf struct { type InstanceOf struct {
Expr node.Node Expr node.Node
Class node.Node Class node.Node
} }
// NewInstanceOf node constuctor
func NewInstanceOf(Expr node.Node, Class node.Node) *InstanceOf { func NewInstanceOf(Expr node.Node, Class node.Node) *InstanceOf {
return &InstanceOf{ return &InstanceOf{
Expr, Expr,
@ -16,10 +18,13 @@ func NewInstanceOf(Expr node.Node, Class node.Node) *InstanceOf {
} }
} }
// Attributes returns node attributes as map
func (n *InstanceOf) Attributes() map[string]interface{} { func (n *InstanceOf) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *InstanceOf) Walk(v node.Visitor) { func (n *InstanceOf) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,20 +4,25 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Isset node
type Isset struct { type Isset struct {
Variables []node.Node Variables []node.Node
} }
// NewIsset node constuctor
func NewIsset(Variables []node.Node) *Isset { func NewIsset(Variables []node.Node) *Isset {
return &Isset{ return &Isset{
Variables, Variables,
} }
} }
// Attributes returns node attributes as map
func (n *Isset) Attributes() map[string]interface{} { func (n *Isset) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Isset) Walk(v node.Visitor) { func (n *Isset) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,20 +4,25 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// List node
type List struct { type List struct {
Items []node.Node Items []node.Node
} }
// NewList node constuctor
func NewList(Items []node.Node) *List { func NewList(Items []node.Node) *List {
return &List{ return &List{
Items, Items,
} }
} }
// Attributes returns node attributes as map
func (n *List) Attributes() map[string]interface{} { func (n *List) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *List) Walk(v node.Visitor) { func (n *List) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,12 +4,14 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// MethodCall node
type MethodCall struct { type MethodCall struct {
Variable node.Node Variable node.Node
Method node.Node Method node.Node
Arguments []node.Node Arguments []node.Node
} }
// NewMethodCall node constuctor
func NewMethodCall(Variable node.Node, Method node.Node, Arguments []node.Node) *MethodCall { func NewMethodCall(Variable node.Node, Method node.Node, Arguments []node.Node) *MethodCall {
return &MethodCall{ return &MethodCall{
Variable, Variable,
@ -18,10 +20,13 @@ func NewMethodCall(Variable node.Node, Method node.Node, Arguments []node.Node)
} }
} }
// Attributes returns node attributes as map
func (n *MethodCall) Attributes() map[string]interface{} { func (n *MethodCall) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *MethodCall) Walk(v node.Visitor) { func (n *MethodCall) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,11 +4,13 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// New node
type New struct { type New struct {
Class node.Node Class node.Node
Arguments []node.Node Arguments []node.Node
} }
// NewNew node constuctor
func NewNew(Class node.Node, Arguments []node.Node) *New { func NewNew(Class node.Node, Arguments []node.Node) *New {
return &New{ return &New{
Class, Class,
@ -16,10 +18,13 @@ func NewNew(Class node.Node, Arguments []node.Node) *New {
} }
} }
// Attributes returns node attributes as map
func (n *New) Attributes() map[string]interface{} { func (n *New) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *New) Walk(v node.Visitor) { func (n *New) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,20 +4,25 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// PostDec node
type PostDec struct { type PostDec struct {
Variable node.Node Variable node.Node
} }
// NewPostDec node constuctor
func NewPostDec(Variable node.Node) *PostDec { func NewPostDec(Variable node.Node) *PostDec {
return &PostDec{ return &PostDec{
Variable, Variable,
} }
} }
// Attributes returns node attributes as map
func (n *PostDec) Attributes() map[string]interface{} { func (n *PostDec) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *PostDec) Walk(v node.Visitor) { func (n *PostDec) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,20 +4,25 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// PostInc node
type PostInc struct { type PostInc struct {
Variable node.Node Variable node.Node
} }
// NewPostInc node constuctor
func NewPostInc(Variable node.Node) *PostInc { func NewPostInc(Variable node.Node) *PostInc {
return &PostInc{ return &PostInc{
Variable, Variable,
} }
} }
// Attributes returns node attributes as map
func (n *PostInc) Attributes() map[string]interface{} { func (n *PostInc) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *PostInc) Walk(v node.Visitor) { func (n *PostInc) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,20 +4,25 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// PreDec node
type PreDec struct { type PreDec struct {
Variable node.Node Variable node.Node
} }
// NewPreDec node constuctor
func NewPreDec(Variable node.Node) *PreDec { func NewPreDec(Variable node.Node) *PreDec {
return &PreDec{ return &PreDec{
Variable, Variable,
} }
} }
// Attributes returns node attributes as map
func (n *PreDec) Attributes() map[string]interface{} { func (n *PreDec) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *PreDec) Walk(v node.Visitor) { func (n *PreDec) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,20 +4,25 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// PreInc node
type PreInc struct { type PreInc struct {
Variable node.Node Variable node.Node
} }
// NewPreInc node constuctor
func NewPreInc(Variable node.Node) *PreInc { func NewPreInc(Variable node.Node) *PreInc {
return &PreInc{ return &PreInc{
Variable, Variable,
} }
} }
// Attributes returns node attributes as map
func (n *PreInc) Attributes() map[string]interface{} { func (n *PreInc) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *PreInc) Walk(v node.Visitor) { func (n *PreInc) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,20 +4,25 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Print node
type Print struct { type Print struct {
Expr node.Node Expr node.Node
} }
// NewPrint node constuctor
func NewPrint(Expression node.Node) *Print { func NewPrint(Expression node.Node) *Print {
return &Print{ return &Print{
Expression, Expression,
} }
} }
// Attributes returns node attributes as map
func (n *Print) Attributes() map[string]interface{} { func (n *Print) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Print) Walk(v node.Visitor) { func (n *Print) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,11 +4,13 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// PropertyFetch node
type PropertyFetch struct { type PropertyFetch struct {
Variable node.Node Variable node.Node
Property node.Node Property node.Node
} }
// NewPropertyFetch node constuctor
func NewPropertyFetch(Variable node.Node, Property node.Node) *PropertyFetch { func NewPropertyFetch(Variable node.Node, Property node.Node) *PropertyFetch {
return &PropertyFetch{ return &PropertyFetch{
Variable, Variable,
@ -16,10 +18,13 @@ func NewPropertyFetch(Variable node.Node, Property node.Node) *PropertyFetch {
} }
} }
// Attributes returns node attributes as map
func (n *PropertyFetch) Attributes() map[string]interface{} { func (n *PropertyFetch) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *PropertyFetch) Walk(v node.Visitor) { func (n *PropertyFetch) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,20 +4,25 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Require node
type Require struct { type Require struct {
Expr node.Node Expr node.Node
} }
// NewRequire node constuctor
func NewRequire(Expression node.Node) *Require { func NewRequire(Expression node.Node) *Require {
return &Require{ return &Require{
Expression, Expression,
} }
} }
// Attributes returns node attributes as map
func (n *Require) Attributes() map[string]interface{} { func (n *Require) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Require) Walk(v node.Visitor) { func (n *Require) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,20 +4,25 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// RequireOnce node
type RequireOnce struct { type RequireOnce struct {
Expr node.Node Expr node.Node
} }
// NewRequireOnce node constuctor
func NewRequireOnce(Expression node.Node) *RequireOnce { func NewRequireOnce(Expression node.Node) *RequireOnce {
return &RequireOnce{ return &RequireOnce{
Expression, Expression,
} }
} }
// Attributes returns node attributes as map
func (n *RequireOnce) Attributes() map[string]interface{} { func (n *RequireOnce) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *RequireOnce) Walk(v node.Visitor) { func (n *RequireOnce) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,20 +4,25 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// ShellExec node
type ShellExec struct { type ShellExec struct {
Parts []node.Node Parts []node.Node
} }
// NewShellExec node constuctor
func NewShellExec(Parts []node.Node) *ShellExec { func NewShellExec(Parts []node.Node) *ShellExec {
return &ShellExec{ return &ShellExec{
Parts, Parts,
} }
} }
// Attributes returns node attributes as map
func (n *ShellExec) Attributes() map[string]interface{} { func (n *ShellExec) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *ShellExec) Walk(v node.Visitor) { func (n *ShellExec) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,20 +4,25 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// ShortArray node
type ShortArray struct { type ShortArray struct {
Items []node.Node Items []node.Node
} }
// NewShortArray node constuctor
func NewShortArray(Items []node.Node) *ShortArray { func NewShortArray(Items []node.Node) *ShortArray {
return &ShortArray{ return &ShortArray{
Items, Items,
} }
} }
// Attributes returns node attributes as map
func (n *ShortArray) Attributes() map[string]interface{} { func (n *ShortArray) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *ShortArray) Walk(v node.Visitor) { func (n *ShortArray) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,20 +4,25 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// ShortList node
type ShortList struct { type ShortList struct {
Items []node.Node Items []node.Node
} }
// NewShortList node constuctor
func NewShortList(Items []node.Node) *ShortList { func NewShortList(Items []node.Node) *ShortList {
return &ShortList{ return &ShortList{
Items, Items,
} }
} }
// Attributes returns node attributes as map
func (n *ShortList) Attributes() map[string]interface{} { func (n *ShortList) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *ShortList) Walk(v node.Visitor) { func (n *ShortList) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,12 +4,14 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// StaticCall node
type StaticCall struct { type StaticCall struct {
Class node.Node Class node.Node
Call node.Node Call node.Node
Arguments []node.Node Arguments []node.Node
} }
// NewStaticCall node constuctor
func NewStaticCall(Class node.Node, Call node.Node, Arguments []node.Node) *StaticCall { func NewStaticCall(Class node.Node, Call node.Node, Arguments []node.Node) *StaticCall {
return &StaticCall{ return &StaticCall{
Class, Class,
@ -18,10 +20,13 @@ func NewStaticCall(Class node.Node, Call node.Node, Arguments []node.Node) *Stat
} }
} }
// Attributes returns node attributes as map
func (n *StaticCall) Attributes() map[string]interface{} { func (n *StaticCall) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *StaticCall) Walk(v node.Visitor) { func (n *StaticCall) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,11 +4,13 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// StaticPropertyFetch node
type StaticPropertyFetch struct { type StaticPropertyFetch struct {
Class node.Node Class node.Node
Property node.Node Property node.Node
} }
// NewStaticPropertyFetch node constuctor
func NewStaticPropertyFetch(Class node.Node, Property node.Node) *StaticPropertyFetch { func NewStaticPropertyFetch(Class node.Node, Property node.Node) *StaticPropertyFetch {
return &StaticPropertyFetch{ return &StaticPropertyFetch{
Class, Class,
@ -16,10 +18,13 @@ func NewStaticPropertyFetch(Class node.Node, Property node.Node) *StaticProperty
} }
} }
// Attributes returns node attributes as map
func (n *StaticPropertyFetch) Attributes() map[string]interface{} { func (n *StaticPropertyFetch) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *StaticPropertyFetch) Walk(v node.Visitor) { func (n *StaticPropertyFetch) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,12 +4,14 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Ternary node
type Ternary struct { type Ternary struct {
Condition node.Node Condition node.Node
IfTrue node.Node IfTrue node.Node
IfFalse node.Node IfFalse node.Node
} }
// NewTernary node constuctor
func NewTernary(Condition node.Node, IfTrue node.Node, IfFalse node.Node) *Ternary { func NewTernary(Condition node.Node, IfTrue node.Node, IfFalse node.Node) *Ternary {
return &Ternary{ return &Ternary{
Condition, Condition,
@ -18,10 +20,13 @@ func NewTernary(Condition node.Node, IfTrue node.Node, IfFalse node.Node) *Terna
} }
} }
// Attributes returns node attributes as map
func (n *Ternary) Attributes() map[string]interface{} { func (n *Ternary) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Ternary) Walk(v node.Visitor) { func (n *Ternary) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,20 +4,25 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// UnaryMinus node
type UnaryMinus struct { type UnaryMinus struct {
Expr node.Node Expr node.Node
} }
// NewUnaryMinus node constuctor
func NewUnaryMinus(Expression node.Node) *UnaryMinus { func NewUnaryMinus(Expression node.Node) *UnaryMinus {
return &UnaryMinus{ return &UnaryMinus{
Expression, Expression,
} }
} }
// Attributes returns node attributes as map
func (n *UnaryMinus) Attributes() map[string]interface{} { func (n *UnaryMinus) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *UnaryMinus) Walk(v node.Visitor) { func (n *UnaryMinus) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,20 +4,25 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// UnaryPlus node
type UnaryPlus struct { type UnaryPlus struct {
Expr node.Node Expr node.Node
} }
// NewUnaryPlus node constuctor
func NewUnaryPlus(Expression node.Node) *UnaryPlus { func NewUnaryPlus(Expression node.Node) *UnaryPlus {
return &UnaryPlus{ return &UnaryPlus{
Expression, Expression,
} }
} }
// Attributes returns node attributes as map
func (n *UnaryPlus) Attributes() map[string]interface{} { func (n *UnaryPlus) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *UnaryPlus) Walk(v node.Visitor) { func (n *UnaryPlus) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,20 +4,25 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Variable node
type Variable struct { type Variable struct {
VarName node.Node VarName node.Node
} }
// NewVariable node constuctor
func NewVariable(VarName node.Node) *Variable { func NewVariable(VarName node.Node) *Variable {
return &Variable{ return &Variable{
VarName, VarName,
} }
} }
// Attributes returns node attributes as map
func (n *Variable) Attributes() map[string]interface{} { func (n *Variable) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Variable) Walk(v node.Visitor) { func (n *Variable) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,11 +4,13 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Yield node
type Yield struct { type Yield struct {
Key node.Node Key node.Node
Value node.Node Value node.Node
} }
// NewYield node constuctor
func NewYield(Key node.Node, Value node.Node) *Yield { func NewYield(Key node.Node, Value node.Node) *Yield {
return &Yield{ return &Yield{
Key, Key,
@ -16,10 +18,13 @@ func NewYield(Key node.Node, Value node.Node) *Yield {
} }
} }
// Attributes returns node attributes as map
func (n *Yield) Attributes() map[string]interface{} { func (n *Yield) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Yield) Walk(v node.Visitor) { func (n *Yield) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,20 +4,25 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// YieldFrom node
type YieldFrom struct { type YieldFrom struct {
Expr node.Node Expr node.Node
} }
// NewYieldFrom node constuctor
func NewYieldFrom(Expression node.Node) *YieldFrom { func NewYieldFrom(Expression node.Node) *YieldFrom {
return &YieldFrom{ return &YieldFrom{
Expression, Expression,
} }
} }
// Attributes returns node attributes as map
func (n *YieldFrom) Attributes() map[string]interface{} { func (n *YieldFrom) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *YieldFrom) Walk(v node.Visitor) { func (n *YieldFrom) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -1,21 +1,26 @@
package node package node
// Identifier node
type Identifier struct { type Identifier struct {
Value string Value string
} }
// NewIdentifier node constuctor
func NewIdentifier(Value string) *Identifier { func NewIdentifier(Value string) *Identifier {
return &Identifier{ return &Identifier{
Value, Value,
} }
} }
// Attributes returns node attributes as map
func (n *Identifier) Attributes() map[string]interface{} { func (n *Identifier) Attributes() map[string]interface{} {
return map[string]interface{}{ return map[string]interface{}{
"Value": n.Value, "Value": n.Value,
} }
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Identifier) Walk(v Visitor) { func (n *Identifier) Walk(v Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// FullyQualified node
type FullyQualified struct { type FullyQualified struct {
Name Name
} }
// NewFullyQualified node constuctor
func NewFullyQualified(Parts []node.Node) *FullyQualified { func NewFullyQualified(Parts []node.Node) *FullyQualified {
return &FullyQualified{ return &FullyQualified{
Name{ Name{

View File

@ -4,20 +4,25 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Name node
type Name struct { type Name struct {
Parts []node.Node Parts []node.Node
} }
// NewName node constuctor
func NewName(Parts []node.Node) *Name { func NewName(Parts []node.Node) *Name {
return &Name{ return &Name{
Parts, Parts,
} }
} }
// Attributes returns node attributes as map
func (n *Name) Attributes() map[string]interface{} { func (n *Name) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Name) Walk(v node.Visitor) { func (n *Name) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,22 +4,27 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// NamePart node
type NamePart struct { type NamePart struct {
Value string Value string
} }
// NewNamePart node constuctor
func NewNamePart(Value string) *NamePart { func NewNamePart(Value string) *NamePart {
return &NamePart{ return &NamePart{
Value, Value,
} }
} }
// Attributes returns node attributes as map
func (n *NamePart) Attributes() map[string]interface{} { func (n *NamePart) Attributes() map[string]interface{} {
return map[string]interface{}{ return map[string]interface{}{
"Value": n.Value, "Value": n.Value,
} }
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *NamePart) Walk(v node.Visitor) { func (n *NamePart) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
// Relative node
type Relative struct { type Relative struct {
Name Name
} }
// NewRelative node constuctor
func NewRelative(Parts []node.Node) *Relative { func NewRelative(Parts []node.Node) *Relative {
return &Relative{ return &Relative{
Name{ Name{

View File

@ -2,6 +2,7 @@ package node
import "fmt" import "fmt"
// Node interface
type Node interface { type Node interface {
Attributes() map[string]interface{} Attributes() map[string]interface{}
Walk(v Visitor) Walk(v Visitor)

View File

@ -1,19 +1,24 @@
package node package node
// Nullable node
type Nullable struct { type Nullable struct {
Expr Node Expr Node
} }
// NewNullable node constuctor
func NewNullable(Expression Node) *Nullable { func NewNullable(Expression Node) *Nullable {
return &Nullable{ return &Nullable{
Expression, Expression,
} }
} }
// Attributes returns node attributes as map
func (n *Nullable) Attributes() map[string]interface{} { func (n *Nullable) Attributes() map[string]interface{} {
return nil return nil
} }
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Nullable) Walk(v Visitor) { func (n *Nullable) Walk(v Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

Some files were not shown because too many files have changed in this diff Show More