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

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

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// BitwiseAnd node
type BitwiseAnd struct {
BinaryOp
}
// NewBitwiseAnd node constuctor
func NewBitwiseAnd(Variable node.Node, Expression node.Node) *BitwiseAnd {
return &BitwiseAnd{
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{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *BitwiseAnd) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// BitwiseOr node
type BitwiseOr struct {
BinaryOp
}
// NewBitwiseOr node constuctor
func NewBitwiseOr(Variable node.Node, Expression node.Node) *BitwiseOr {
return &BitwiseOr{
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{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *BitwiseOr) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// BitwiseXor node
type BitwiseXor struct {
BinaryOp
}
// NewBitwiseXor node constuctor
func NewBitwiseXor(Variable node.Node, Expression node.Node) *BitwiseXor {
return &BitwiseXor{
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{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *BitwiseXor) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// BooleanAnd node
type BooleanAnd struct {
BinaryOp
}
// NewBooleanAnd node constuctor
func NewBooleanAnd(Variable node.Node, Expression node.Node) *BooleanAnd {
return &BooleanAnd{
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{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *BooleanAnd) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// BooleanOr node
type BooleanOr struct {
BinaryOp
}
// NewBooleanOr node constuctor
func NewBooleanOr(Variable node.Node, Expression node.Node) *BooleanOr {
return &BooleanOr{
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{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *BooleanOr) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// Coalesce node
type Coalesce struct {
BinaryOp
}
// NewCoalesce node constuctor
func NewCoalesce(Variable node.Node, Expression node.Node) *Coalesce {
return &Coalesce{
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{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Coalesce) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// Concat node
type Concat struct {
BinaryOp
}
// NewConcat node constuctor
func NewConcat(Variable node.Node, Expression node.Node) *Concat {
return &Concat{
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{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Concat) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// Div node
type Div struct {
BinaryOp
}
// NewDiv node constuctor
func NewDiv(Variable node.Node, Expression node.Node) *Div {
return &Div{
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{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Div) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// Equal node
type Equal struct {
BinaryOp
}
// NewEqual node constuctor
func NewEqual(Variable node.Node, Expression node.Node) *Equal {
return &Equal{
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{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Equal) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// Greater node
type Greater struct {
BinaryOp
}
// NewGreater node constuctor
func NewGreater(Variable node.Node, Expression node.Node) *Greater {
return &Greater{
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{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Greater) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// GreaterOrEqual node
type GreaterOrEqual struct {
BinaryOp
}
// NewGreaterOrEqual node constuctor
func NewGreaterOrEqual(Variable node.Node, Expression node.Node) *GreaterOrEqual {
return &GreaterOrEqual{
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{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *GreaterOrEqual) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// Identical node
type Identical struct {
BinaryOp
}
// NewIdentical node constuctor
func NewIdentical(Variable node.Node, Expression node.Node) *Identical {
return &Identical{
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{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Identical) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// LogicalAnd node
type LogicalAnd struct {
BinaryOp
}
// NewLogicalAnd node constuctor
func NewLogicalAnd(Variable node.Node, Expression node.Node) *LogicalAnd {
return &LogicalAnd{
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{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *LogicalAnd) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// LogicalOr node
type LogicalOr struct {
BinaryOp
}
// NewLogicalOr node constuctor
func NewLogicalOr(Variable node.Node, Expression node.Node) *LogicalOr {
return &LogicalOr{
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{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *LogicalOr) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// LogicalXor node
type LogicalXor struct {
BinaryOp
}
// NewLogicalXor node constuctor
func NewLogicalXor(Variable node.Node, Expression node.Node) *LogicalXor {
return &LogicalXor{
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{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *LogicalXor) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// Minus node
type Minus struct {
BinaryOp
}
// NewMinus node constuctor
func NewMinus(Variable node.Node, Expression node.Node) *Minus {
return &Minus{
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{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Minus) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// Mod node
type Mod struct {
BinaryOp
}
// NewMod node constuctor
func NewMod(Variable node.Node, Expression node.Node) *Mod {
return &Mod{
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{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Mod) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// Mul node
type Mul struct {
BinaryOp
}
// NewMul node constuctor
func NewMul(Variable node.Node, Expression node.Node) *Mul {
return &Mul{
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{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Mul) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// NotEqual node
type NotEqual struct {
BinaryOp
}
// NewNotEqual node constuctor
func NewNotEqual(Variable node.Node, Expression node.Node) *NotEqual {
return &NotEqual{
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{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *NotEqual) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// NotIdentical node
type NotIdentical struct {
BinaryOp
}
// NewNotIdentical node constuctor
func NewNotIdentical(Variable node.Node, Expression node.Node) *NotIdentical {
return &NotIdentical{
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{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *NotIdentical) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// Plus node
type Plus struct {
BinaryOp
}
// NewPlus node constuctor
func NewPlus(Variable node.Node, Expression node.Node) *Plus {
return &Plus{
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{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Plus) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// Pow node
type Pow struct {
BinaryOp
}
// NewPow node constuctor
func NewPow(Variable node.Node, Expression node.Node) *Pow {
return &Pow{
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{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Pow) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// ShiftLeft node
type ShiftLeft struct {
BinaryOp
}
// NewShiftLeft node constuctor
func NewShiftLeft(Variable node.Node, Expression node.Node) *ShiftLeft {
return &ShiftLeft{
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{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *ShiftLeft) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// ShiftRight node
type ShiftRight struct {
BinaryOp
}
// NewShiftRight node constuctor
func NewShiftRight(Variable node.Node, Expression node.Node) *ShiftRight {
return &ShiftRight{
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{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *ShiftRight) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// Smaller node
type Smaller struct {
BinaryOp
}
// NewSmaller node constuctor
func NewSmaller(Variable node.Node, Expression node.Node) *Smaller {
return &Smaller{
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{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Smaller) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// SmallerOrEqual node
type SmallerOrEqual struct {
BinaryOp
}
// NewSmallerOrEqual node constuctor
func NewSmallerOrEqual(Variable node.Node, Expression node.Node) *SmallerOrEqual {
return &SmallerOrEqual{
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{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *SmallerOrEqual) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@@ -4,10 +4,12 @@ import (
"github.com/z7zmey/php-parser/node"
)
// Spaceship node
type Spaceship struct {
BinaryOp
}
// NewSpaceship node constuctor
func NewSpaceship(Variable node.Node, Expression node.Node) *Spaceship {
return &Spaceship{
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{} {
return nil
}
// Walk traverses nodes
// Walk is invoked recursively until v.EnterNode returns true
func (n *Spaceship) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return