extract positions package

This commit is contained in:
z7zmey 2018-01-09 15:51:32 +02:00
parent 23d938df99
commit 2078a6cde6
166 changed files with 2060 additions and 3030 deletions

View File

@ -4,19 +4,22 @@ import (
"fmt"
"reflect"
"github.com/z7zmey/php-parser/position"
"github.com/z7zmey/php-parser/comment"
"github.com/z7zmey/php-parser/node"
)
type dumper struct {
indent string
comments comment.Comments
indent string
comments comment.Comments
positions position.Positions
}
func (d dumper) EnterNode(n node.Node) bool {
fmt.Printf("%v%v", d.indent, reflect.TypeOf(n))
if p := n.Position(); p != nil {
if p := d.positions[n]; p != nil {
fmt.Printf(" %v", *p)
}
if a := n.Attributes(); len(a) > 0 {
@ -36,7 +39,7 @@ func (d dumper) EnterNode(n node.Node) bool {
func (d dumper) GetChildrenVisitor(key string) node.Visitor {
fmt.Printf("%v%q:\n", d.indent+" ", key)
return dumper{d.indent + " ", d.comments}
return dumper{d.indent + " ", d.comments, d.positions}
}
func (d dumper) LeaveNode(n node.Node) {

View File

@ -19,9 +19,9 @@ func main() {
fmt.Printf("==> %s\n", real)
src, _ := os.Open(string(real))
rootnode, comments := parser.Parse(src, real)
rootnode, comments, positions := parser.Parse(src, real)
rootnode.Walk(dumper{" | ", comments})
rootnode.Walk(dumper{" | ", comments, positions})
}
}

View File

@ -1,14 +1,12 @@
package node
type Argument struct {
position *Position
Variadic bool
Expr Node
}
func NewArgument(Expression Node, Variadic bool) *Argument {
return &Argument{
nil,
Variadic,
Expression,
}
@ -20,15 +18,6 @@ func (n *Argument) Attributes() map[string]interface{} {
}
}
func (n *Argument) Position() *Position {
return n.position
}
func (n *Argument) SetPosition(p *Position) Node {
n.position = p
return n
}
func (n *Argument) Walk(v Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,13 +5,11 @@ import (
)
type Array struct {
position *node.Position
Items []node.Node
Items []node.Node
}
func NewArray(Items []node.Node) *Array {
return &Array{
nil,
Items,
}
}
@ -20,15 +18,6 @@ func (n *Array) Attributes() map[string]interface{} {
return nil
}
func (n *Array) Position() *node.Position {
return n.position
}
func (n *Array) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Array) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,14 +5,12 @@ import (
)
type ArrayDimFetch struct {
position *node.Position
Variable node.Node
Dim node.Node
}
func NewArrayDimFetch(Variable node.Node, Dim node.Node) *ArrayDimFetch {
return &ArrayDimFetch{
nil,
Variable,
Dim,
}
@ -22,15 +20,6 @@ func (n *ArrayDimFetch) Attributes() map[string]interface{} {
return nil
}
func (n *ArrayDimFetch) Position() *node.Position {
return n.position
}
func (n *ArrayDimFetch) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *ArrayDimFetch) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,15 +5,13 @@ import (
)
type ArrayItem struct {
position *node.Position
ByRef bool
Key node.Node
Val node.Node
ByRef bool
Key node.Node
Val node.Node
}
func NewArrayItem(Key node.Node, Val node.Node, ByRef bool) *ArrayItem {
return &ArrayItem{
nil,
ByRef,
Key,
Val,
@ -26,15 +24,6 @@ func (n *ArrayItem) Attributes() map[string]interface{} {
}
}
func (n *ArrayItem) Position() *node.Position {
return n.position
}
func (n *ArrayItem) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *ArrayItem) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type Assign struct {
func NewAssign(Variable node.Node, Expression node.Node) *Assign {
return &Assign{
AssignOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *Assign) Attributes() map[string]interface{} {
return nil
}
func (n *Assign) Position() *node.Position {
return n.position
}
func (n *Assign) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Assign) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,7 +5,6 @@ import (
)
type AssignOp struct {
position *node.Position
Variable node.Node
Expression node.Node
}

View File

@ -11,7 +11,6 @@ type AssignRef struct {
func NewAssignRef(Variable node.Node, Expression node.Node) *AssignRef {
return &AssignRef{
AssignOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *AssignRef) Attributes() map[string]interface{} {
return nil
}
func (n *AssignRef) Position() *node.Position {
return n.position
}
func (n *AssignRef) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *AssignRef) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type BitwiseAnd struct {
func NewBitwiseAnd(Variable node.Node, Expression node.Node) *BitwiseAnd {
return &BitwiseAnd{
AssignOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *BitwiseAnd) Attributes() map[string]interface{} {
return nil
}
func (n *BitwiseAnd) Position() *node.Position {
return n.position
}
func (n *BitwiseAnd) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *BitwiseAnd) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type BitwiseOr struct {
func NewBitwiseOr(Variable node.Node, Expression node.Node) *BitwiseOr {
return &BitwiseOr{
AssignOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *BitwiseOr) Attributes() map[string]interface{} {
return nil
}
func (n *BitwiseOr) Position() *node.Position {
return n.position
}
func (n *BitwiseOr) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *BitwiseOr) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type BitwiseXor struct {
func NewBitwiseXor(Variable node.Node, Expression node.Node) *BitwiseXor {
return &BitwiseXor{
AssignOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *BitwiseXor) Attributes() map[string]interface{} {
return nil
}
func (n *BitwiseXor) Position() *node.Position {
return n.position
}
func (n *BitwiseXor) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *BitwiseXor) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type Concat struct {
func NewConcat(Variable node.Node, Expression node.Node) *Concat {
return &Concat{
AssignOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *Concat) Attributes() map[string]interface{} {
return nil
}
func (n *Concat) Position() *node.Position {
return n.position
}
func (n *Concat) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Concat) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type Div struct {
func NewDiv(Variable node.Node, Expression node.Node) *Div {
return &Div{
AssignOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *Div) Attributes() map[string]interface{} {
return nil
}
func (n *Div) Position() *node.Position {
return n.position
}
func (n *Div) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Div) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type Minus struct {
func NewMinus(Variable node.Node, Expression node.Node) *Minus {
return &Minus{
AssignOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *Minus) Attributes() map[string]interface{} {
return nil
}
func (n *Minus) Position() *node.Position {
return n.position
}
func (n *Minus) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Minus) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type Mod struct {
func NewMod(Variable node.Node, Expression node.Node) *Mod {
return &Mod{
AssignOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *Mod) Attributes() map[string]interface{} {
return nil
}
func (n *Mod) Position() *node.Position {
return n.position
}
func (n *Mod) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Mod) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type Mul struct {
func NewMul(Variable node.Node, Expression node.Node) *Mul {
return &Mul{
AssignOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *Mul) Attributes() map[string]interface{} {
return nil
}
func (n *Mul) Position() *node.Position {
return n.position
}
func (n *Mul) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Mul) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type Plus struct {
func NewPlus(Variable node.Node, Expression node.Node) *Plus {
return &Plus{
AssignOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *Plus) Attributes() map[string]interface{} {
return nil
}
func (n *Plus) Position() *node.Position {
return n.position
}
func (n *Plus) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Plus) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type Pow struct {
func NewPow(Variable node.Node, Expression node.Node) *Pow {
return &Pow{
AssignOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *Pow) Attributes() map[string]interface{} {
return nil
}
func (n *Pow) Position() *node.Position {
return n.position
}
func (n *Pow) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Pow) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type ShiftLeft struct {
func NewShiftLeft(Variable node.Node, Expression node.Node) *ShiftLeft {
return &ShiftLeft{
AssignOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *ShiftLeft) Attributes() map[string]interface{} {
return nil
}
func (n *ShiftLeft) Position() *node.Position {
return n.position
}
func (n *ShiftLeft) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *ShiftLeft) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type ShiftRight struct {
func NewShiftRight(Variable node.Node, Expression node.Node) *ShiftRight {
return &ShiftRight{
AssignOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *ShiftRight) Attributes() map[string]interface{} {
return nil
}
func (n *ShiftRight) Position() *node.Position {
return n.position
}
func (n *ShiftRight) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *ShiftRight) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,7 +5,6 @@ import (
)
type BinaryOp struct {
position *node.Position
Left node.Node
Right node.Node
Left node.Node
Right node.Node
}

View File

@ -11,7 +11,6 @@ type BitwiseAnd struct {
func NewBitwiseAnd(Variable node.Node, Expression node.Node) *BitwiseAnd {
return &BitwiseAnd{
BinaryOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *BitwiseAnd) Attributes() map[string]interface{} {
return nil
}
func (n *BitwiseAnd) Position() *node.Position {
return n.position
}
func (n *BitwiseAnd) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *BitwiseAnd) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type BitwiseOr struct {
func NewBitwiseOr(Variable node.Node, Expression node.Node) *BitwiseOr {
return &BitwiseOr{
BinaryOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *BitwiseOr) Attributes() map[string]interface{} {
return nil
}
func (n *BitwiseOr) Position() *node.Position {
return n.position
}
func (n *BitwiseOr) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *BitwiseOr) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type BitwiseXor struct {
func NewBitwiseXor(Variable node.Node, Expression node.Node) *BitwiseXor {
return &BitwiseXor{
BinaryOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *BitwiseXor) Attributes() map[string]interface{} {
return nil
}
func (n *BitwiseXor) Position() *node.Position {
return n.position
}
func (n *BitwiseXor) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *BitwiseXor) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type BooleanAnd struct {
func NewBooleanAnd(Variable node.Node, Expression node.Node) *BooleanAnd {
return &BooleanAnd{
BinaryOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *BooleanAnd) Attributes() map[string]interface{} {
return nil
}
func (n *BooleanAnd) Position() *node.Position {
return n.position
}
func (n *BooleanAnd) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *BooleanAnd) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type BooleanOr struct {
func NewBooleanOr(Variable node.Node, Expression node.Node) *BooleanOr {
return &BooleanOr{
BinaryOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *BooleanOr) Attributes() map[string]interface{} {
return nil
}
func (n *BooleanOr) Position() *node.Position {
return n.position
}
func (n *BooleanOr) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *BooleanOr) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type Coalesce struct {
func NewCoalesce(Variable node.Node, Expression node.Node) *Coalesce {
return &Coalesce{
BinaryOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *Coalesce) Attributes() map[string]interface{} {
return nil
}
func (n *Coalesce) Position() *node.Position {
return n.position
}
func (n *Coalesce) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Coalesce) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type Concat struct {
func NewConcat(Variable node.Node, Expression node.Node) *Concat {
return &Concat{
BinaryOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *Concat) Attributes() map[string]interface{} {
return nil
}
func (n *Concat) Position() *node.Position {
return n.position
}
func (n *Concat) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Concat) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type Div struct {
func NewDiv(Variable node.Node, Expression node.Node) *Div {
return &Div{
BinaryOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *Div) Attributes() map[string]interface{} {
return nil
}
func (n *Div) Position() *node.Position {
return n.position
}
func (n *Div) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Div) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type Equal struct {
func NewEqual(Variable node.Node, Expression node.Node) *Equal {
return &Equal{
BinaryOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *Equal) Attributes() map[string]interface{} {
return nil
}
func (n *Equal) Position() *node.Position {
return n.position
}
func (n *Equal) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Equal) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type Greater struct {
func NewGreater(Variable node.Node, Expression node.Node) *Greater {
return &Greater{
BinaryOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *Greater) Attributes() map[string]interface{} {
return nil
}
func (n *Greater) Position() *node.Position {
return n.position
}
func (n *Greater) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Greater) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type GreaterOrEqual struct {
func NewGreaterOrEqual(Variable node.Node, Expression node.Node) *GreaterOrEqual {
return &GreaterOrEqual{
BinaryOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *GreaterOrEqual) Attributes() map[string]interface{} {
return nil
}
func (n *GreaterOrEqual) Position() *node.Position {
return n.position
}
func (n *GreaterOrEqual) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *GreaterOrEqual) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type Identical struct {
func NewIdentical(Variable node.Node, Expression node.Node) *Identical {
return &Identical{
BinaryOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *Identical) Attributes() map[string]interface{} {
return nil
}
func (n *Identical) Position() *node.Position {
return n.position
}
func (n *Identical) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Identical) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type LogicalAnd struct {
func NewLogicalAnd(Variable node.Node, Expression node.Node) *LogicalAnd {
return &LogicalAnd{
BinaryOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *LogicalAnd) Attributes() map[string]interface{} {
return nil
}
func (n *LogicalAnd) Position() *node.Position {
return n.position
}
func (n *LogicalAnd) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *LogicalAnd) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type LogicalOr struct {
func NewLogicalOr(Variable node.Node, Expression node.Node) *LogicalOr {
return &LogicalOr{
BinaryOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *LogicalOr) Attributes() map[string]interface{} {
return nil
}
func (n *LogicalOr) Position() *node.Position {
return n.position
}
func (n *LogicalOr) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *LogicalOr) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type LogicalXor struct {
func NewLogicalXor(Variable node.Node, Expression node.Node) *LogicalXor {
return &LogicalXor{
BinaryOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *LogicalXor) Attributes() map[string]interface{} {
return nil
}
func (n *LogicalXor) Position() *node.Position {
return n.position
}
func (n *LogicalXor) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *LogicalXor) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type Minus struct {
func NewMinus(Variable node.Node, Expression node.Node) *Minus {
return &Minus{
BinaryOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *Minus) Attributes() map[string]interface{} {
return nil
}
func (n *Minus) Position() *node.Position {
return n.position
}
func (n *Minus) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Minus) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type Mod struct {
func NewMod(Variable node.Node, Expression node.Node) *Mod {
return &Mod{
BinaryOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *Mod) Attributes() map[string]interface{} {
return nil
}
func (n *Mod) Position() *node.Position {
return n.position
}
func (n *Mod) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Mod) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type Mul struct {
func NewMul(Variable node.Node, Expression node.Node) *Mul {
return &Mul{
BinaryOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *Mul) Attributes() map[string]interface{} {
return nil
}
func (n *Mul) Position() *node.Position {
return n.position
}
func (n *Mul) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Mul) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type NotEqual struct {
func NewNotEqual(Variable node.Node, Expression node.Node) *NotEqual {
return &NotEqual{
BinaryOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *NotEqual) Attributes() map[string]interface{} {
return nil
}
func (n *NotEqual) Position() *node.Position {
return n.position
}
func (n *NotEqual) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *NotEqual) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type NotIdentical struct {
func NewNotIdentical(Variable node.Node, Expression node.Node) *NotIdentical {
return &NotIdentical{
BinaryOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *NotIdentical) Attributes() map[string]interface{} {
return nil
}
func (n *NotIdentical) Position() *node.Position {
return n.position
}
func (n *NotIdentical) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *NotIdentical) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type Plus struct {
func NewPlus(Variable node.Node, Expression node.Node) *Plus {
return &Plus{
BinaryOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *Plus) Attributes() map[string]interface{} {
return nil
}
func (n *Plus) Position() *node.Position {
return n.position
}
func (n *Plus) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Plus) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type Pow struct {
func NewPow(Variable node.Node, Expression node.Node) *Pow {
return &Pow{
BinaryOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *Pow) Attributes() map[string]interface{} {
return nil
}
func (n *Pow) Position() *node.Position {
return n.position
}
func (n *Pow) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Pow) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type ShiftLeft struct {
func NewShiftLeft(Variable node.Node, Expression node.Node) *ShiftLeft {
return &ShiftLeft{
BinaryOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *ShiftLeft) Attributes() map[string]interface{} {
return nil
}
func (n *ShiftLeft) Position() *node.Position {
return n.position
}
func (n *ShiftLeft) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *ShiftLeft) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type ShiftRight struct {
func NewShiftRight(Variable node.Node, Expression node.Node) *ShiftRight {
return &ShiftRight{
BinaryOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *ShiftRight) Attributes() map[string]interface{} {
return nil
}
func (n *ShiftRight) Position() *node.Position {
return n.position
}
func (n *ShiftRight) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *ShiftRight) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type Smaller struct {
func NewSmaller(Variable node.Node, Expression node.Node) *Smaller {
return &Smaller{
BinaryOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *Smaller) Attributes() map[string]interface{} {
return nil
}
func (n *Smaller) Position() *node.Position {
return n.position
}
func (n *Smaller) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Smaller) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type SmallerOrEqual struct {
func NewSmallerOrEqual(Variable node.Node, Expression node.Node) *SmallerOrEqual {
return &SmallerOrEqual{
BinaryOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *SmallerOrEqual) Attributes() map[string]interface{} {
return nil
}
func (n *SmallerOrEqual) Position() *node.Position {
return n.position
}
func (n *SmallerOrEqual) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *SmallerOrEqual) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type Spaceship struct {
func NewSpaceship(Variable node.Node, Expression node.Node) *Spaceship {
return &Spaceship{
BinaryOp{
nil,
Variable,
Expression,
},
@ -22,15 +21,6 @@ func (n *Spaceship) Attributes() map[string]interface{} {
return nil
}
func (n *Spaceship) Position() *node.Position {
return n.position
}
func (n *Spaceship) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Spaceship) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,13 +5,11 @@ import (
)
type BitwiseNot struct {
position *node.Position
Expr node.Node
Expr node.Node
}
func NewBitwiseNot(Expression node.Node) *BitwiseNot {
return &BitwiseNot{
nil,
Expression,
}
}
@ -20,15 +18,6 @@ func (n *BitwiseNot) Attributes() map[string]interface{} {
return nil
}
func (n *BitwiseNot) Position() *node.Position {
return n.position
}
func (n *BitwiseNot) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *BitwiseNot) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,13 +5,11 @@ import (
)
type BooleanNot struct {
position *node.Position
Expr node.Node
Expr node.Node
}
func NewBooleanNot(Expression node.Node) *BooleanNot {
return &BooleanNot{
nil,
Expression,
}
}
@ -20,15 +18,6 @@ func (n *BooleanNot) Attributes() map[string]interface{} {
return nil
}
func (n *BooleanNot) Position() *node.Position {
return n.position
}
func (n *BooleanNot) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *BooleanNot) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,6 +5,5 @@ import (
)
type Cast struct {
position *node.Position
Expr node.Node
Expr node.Node
}

View File

@ -11,7 +11,6 @@ type CastArray struct {
func NewCastArray(Expr node.Node) *CastArray {
return &CastArray{
Cast{
nil,
Expr,
},
}
@ -21,15 +20,6 @@ func (n *CastArray) Attributes() map[string]interface{} {
return nil
}
func (n *CastArray) Position() *node.Position {
return n.position
}
func (n *CastArray) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *CastArray) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type CastBool struct {
func NewCastBool(Expr node.Node) *CastBool {
return &CastBool{
Cast{
nil,
Expr,
},
}
@ -21,15 +20,6 @@ func (n *CastBool) Attributes() map[string]interface{} {
return nil
}
func (n *CastBool) Position() *node.Position {
return n.position
}
func (n *CastBool) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *CastBool) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type CastDouble struct {
func NewCastDouble(Expr node.Node) *CastDouble {
return &CastDouble{
Cast{
nil,
Expr,
},
}
@ -21,15 +20,6 @@ func (n *CastDouble) Attributes() map[string]interface{} {
return nil
}
func (n *CastDouble) Position() *node.Position {
return n.position
}
func (n *CastDouble) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *CastDouble) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type CastInt struct {
func NewCastInt(Expr node.Node) *CastInt {
return &CastInt{
Cast{
nil,
Expr,
},
}
@ -21,15 +20,6 @@ func (n *CastInt) Attributes() map[string]interface{} {
return nil
}
func (n *CastInt) Position() *node.Position {
return n.position
}
func (n *CastInt) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *CastInt) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type CastObject struct {
func NewCastObject(Expr node.Node) *CastObject {
return &CastObject{
Cast{
nil,
Expr,
},
}
@ -21,15 +20,6 @@ func (n *CastObject) Attributes() map[string]interface{} {
return nil
}
func (n *CastObject) Position() *node.Position {
return n.position
}
func (n *CastObject) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *CastObject) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type CastString struct {
func NewCastString(Expr node.Node) *CastString {
return &CastString{
Cast{
nil,
Expr,
},
}
@ -21,15 +20,6 @@ func (n *CastString) Attributes() map[string]interface{} {
return nil
}
func (n *CastString) Position() *node.Position {
return n.position
}
func (n *CastString) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *CastString) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type CastUnset struct {
func NewCastUnset(Expr node.Node) *CastUnset {
return &CastUnset{
Cast{
nil,
Expr,
},
}
@ -21,15 +20,6 @@ func (n *CastUnset) Attributes() map[string]interface{} {
return nil
}
func (n *CastUnset) Position() *node.Position {
return n.position
}
func (n *CastUnset) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *CastUnset) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,14 +5,12 @@ import (
)
type ClassConstFetch struct {
position *node.Position
Class node.Node
ConstantName node.Node
}
func NewClassConstFetch(Class node.Node, ConstantName node.Node) *ClassConstFetch {
return &ClassConstFetch{
nil,
Class,
ConstantName,
}
@ -22,15 +20,6 @@ func (n *ClassConstFetch) Attributes() map[string]interface{} {
return nil
}
func (n *ClassConstFetch) Position() *node.Position {
return n.position
}
func (n *ClassConstFetch) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *ClassConstFetch) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,13 +5,11 @@ import (
)
type Clone struct {
position *node.Position
Expr node.Node
Expr node.Node
}
func NewClone(Expression node.Node) *Clone {
return &Clone{
nil,
Expression,
}
}
@ -20,15 +18,6 @@ func (n *Clone) Attributes() map[string]interface{} {
return nil
}
func (n *Clone) Position() *node.Position {
return n.position
}
func (n *Clone) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Clone) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,7 +5,6 @@ import (
)
type Closure struct {
position *node.Position
ReturnsRef bool
Static bool
PhpDocComment string
@ -17,7 +16,6 @@ type Closure struct {
func NewClosure(Params []node.Node, Uses []node.Node, ReturnType node.Node, Stmts []node.Node, Static bool, ReturnsRef bool, PhpDocComment string) *Closure {
return &Closure{
nil,
ReturnsRef,
Static,
PhpDocComment,
@ -36,15 +34,6 @@ func (n *Closure) Attributes() map[string]interface{} {
}
}
func (n *Closure) Position() *node.Position {
return n.position
}
func (n *Closure) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Closure) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,14 +5,12 @@ import (
)
type ClusureUse struct {
position *node.Position
ByRef bool
Variable node.Node
}
func NewClusureUse(Variable node.Node, ByRef bool) *ClusureUse {
return &ClusureUse{
nil,
ByRef,
Variable,
}
@ -24,15 +22,6 @@ func (n *ClusureUse) Attributes() map[string]interface{} {
}
}
func (n *ClusureUse) Position() *node.Position {
return n.position
}
func (n *ClusureUse) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *ClusureUse) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,13 +5,11 @@ import (
)
type ConstFetch struct {
position *node.Position
Constant node.Node
}
func NewConstFetch(Constant node.Node) *ConstFetch {
return &ConstFetch{
nil,
Constant,
}
}
@ -20,15 +18,6 @@ func (n *ConstFetch) Attributes() map[string]interface{} {
return nil
}
func (n *ConstFetch) Position() *node.Position {
return n.position
}
func (n *ConstFetch) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *ConstFetch) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,13 +5,11 @@ import (
)
type Empty struct {
position *node.Position
Expr node.Node
Expr node.Node
}
func NewEmpty(Expression node.Node) *Empty {
return &Empty{
nil,
Expression,
}
}
@ -20,15 +18,6 @@ func (n *Empty) Attributes() map[string]interface{} {
return nil
}
func (n *Empty) Position() *node.Position {
return n.position
}
func (n *Empty) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Empty) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,13 +5,11 @@ import (
)
type ErrorSuppress struct {
position *node.Position
Expr node.Node
Expr node.Node
}
func NewErrorSuppress(Expression node.Node) *ErrorSuppress {
return &ErrorSuppress{
nil,
Expression,
}
}
@ -20,15 +18,6 @@ func (n *ErrorSuppress) Attributes() map[string]interface{} {
return nil
}
func (n *ErrorSuppress) Position() *node.Position {
return n.position
}
func (n *ErrorSuppress) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *ErrorSuppress) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,13 +5,11 @@ import (
)
type Eval struct {
position *node.Position
Expr node.Node
Expr node.Node
}
func NewEval(Expression node.Node) *Eval {
return &Eval{
nil,
Expression,
}
}
@ -20,15 +18,6 @@ func (n *Eval) Attributes() map[string]interface{} {
return nil
}
func (n *Eval) Position() *node.Position {
return n.position
}
func (n *Eval) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Eval) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,14 +5,12 @@ import (
)
type Exit struct {
position *node.Position
Expr node.Node
IsDie bool
Expr node.Node
IsDie bool
}
func NewExit(Expr node.Node, IsDie bool) *Exit {
return &Exit{
nil,
Expr,
IsDie,
}
@ -24,15 +22,6 @@ func (n *Exit) Attributes() map[string]interface{} {
}
}
func (n *Exit) Position() *node.Position {
return n.position
}
func (n *Exit) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Exit) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,14 +5,12 @@ import (
)
type FunctionCall struct {
position *node.Position
Function node.Node
Arguments []node.Node
}
func NewFunctionCall(Function node.Node, Arguments []node.Node) *FunctionCall {
return &FunctionCall{
nil,
Function,
Arguments,
}
@ -22,15 +20,6 @@ func (n *FunctionCall) Attributes() map[string]interface{} {
return nil
}
func (n *FunctionCall) Position() *node.Position {
return n.position
}
func (n *FunctionCall) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *FunctionCall) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,13 +5,11 @@ import (
)
type Include struct {
position *node.Position
Expr node.Node
Expr node.Node
}
func NewInclude(Expression node.Node) *Include {
return &Include{
nil,
Expression,
}
}
@ -20,15 +18,6 @@ func (n *Include) Attributes() map[string]interface{} {
return nil
}
func (n *Include) Position() *node.Position {
return n.position
}
func (n *Include) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Include) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,13 +5,11 @@ import (
)
type IncludeOnce struct {
position *node.Position
Expr node.Node
Expr node.Node
}
func NewIncludeOnce(Expression node.Node) *IncludeOnce {
return &IncludeOnce{
nil,
Expression,
}
}
@ -20,15 +18,6 @@ func (n *IncludeOnce) Attributes() map[string]interface{} {
return nil
}
func (n *IncludeOnce) Position() *node.Position {
return n.position
}
func (n *IncludeOnce) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *IncludeOnce) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,14 +5,12 @@ import (
)
type InstanceOf struct {
position *node.Position
Expr node.Node
Class node.Node
Expr node.Node
Class node.Node
}
func NewInstanceOf(Expr node.Node, Class node.Node) *InstanceOf {
return &InstanceOf{
nil,
Expr,
Class,
}
@ -22,15 +20,6 @@ func (n *InstanceOf) Attributes() map[string]interface{} {
return nil
}
func (n *InstanceOf) Position() *node.Position {
return n.position
}
func (n *InstanceOf) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *InstanceOf) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,13 +5,11 @@ import (
)
type Isset struct {
position *node.Position
Variables []node.Node
}
func NewIsset(Variables []node.Node) *Isset {
return &Isset{
nil,
Variables,
}
}
@ -20,15 +18,6 @@ func (n *Isset) Attributes() map[string]interface{} {
return nil
}
func (n *Isset) Position() *node.Position {
return n.position
}
func (n *Isset) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Isset) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,13 +5,11 @@ import (
)
type List struct {
position *node.Position
Items []node.Node
Items []node.Node
}
func NewList(Items []node.Node) *List {
return &List{
nil,
Items,
}
}
@ -20,15 +18,6 @@ func (n *List) Attributes() map[string]interface{} {
return nil
}
func (n *List) Position() *node.Position {
return n.position
}
func (n *List) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *List) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,7 +5,6 @@ import (
)
type MethodCall struct {
position *node.Position
Variable node.Node
Method node.Node
Arguments []node.Node
@ -13,7 +12,6 @@ type MethodCall struct {
func NewMethodCall(Variable node.Node, Method node.Node, Arguments []node.Node) *MethodCall {
return &MethodCall{
nil,
Variable,
Method,
Arguments,
@ -24,15 +22,6 @@ func (n *MethodCall) Attributes() map[string]interface{} {
return nil
}
func (n *MethodCall) Position() *node.Position {
return n.position
}
func (n *MethodCall) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *MethodCall) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,14 +5,12 @@ import (
)
type New struct {
position *node.Position
Class node.Node
Arguments []node.Node
}
func NewNew(Class node.Node, Arguments []node.Node) *New {
return &New{
nil,
Class,
Arguments,
}
@ -22,15 +20,6 @@ func (n *New) Attributes() map[string]interface{} {
return nil
}
func (n *New) Position() *node.Position {
return n.position
}
func (n *New) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *New) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,13 +5,11 @@ import (
)
type PostDec struct {
position *node.Position
Variable node.Node
}
func NewPostDec(Variable node.Node) *PostDec {
return &PostDec{
nil,
Variable,
}
}
@ -20,15 +18,6 @@ func (n *PostDec) Attributes() map[string]interface{} {
return nil
}
func (n *PostDec) Position() *node.Position {
return n.position
}
func (n *PostDec) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *PostDec) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,13 +5,11 @@ import (
)
type PostInc struct {
position *node.Position
Variable node.Node
}
func NewPostInc(Variable node.Node) *PostInc {
return &PostInc{
nil,
Variable,
}
}
@ -20,15 +18,6 @@ func (n *PostInc) Attributes() map[string]interface{} {
return nil
}
func (n *PostInc) Position() *node.Position {
return n.position
}
func (n *PostInc) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *PostInc) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,13 +5,11 @@ import (
)
type PreDec struct {
position *node.Position
Variable node.Node
}
func NewPreDec(Variable node.Node) *PreDec {
return &PreDec{
nil,
Variable,
}
}
@ -20,15 +18,6 @@ func (n *PreDec) Attributes() map[string]interface{} {
return nil
}
func (n *PreDec) Position() *node.Position {
return n.position
}
func (n *PreDec) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *PreDec) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,13 +5,11 @@ import (
)
type PreInc struct {
position *node.Position
Variable node.Node
}
func NewPreInc(Variable node.Node) *PreInc {
return &PreInc{
nil,
Variable,
}
}
@ -20,15 +18,6 @@ func (n *PreInc) Attributes() map[string]interface{} {
return nil
}
func (n *PreInc) Position() *node.Position {
return n.position
}
func (n *PreInc) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *PreInc) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,13 +5,11 @@ import (
)
type Print struct {
position *node.Position
Expr node.Node
Expr node.Node
}
func NewPrint(Expression node.Node) *Print {
return &Print{
nil,
Expression,
}
}
@ -20,15 +18,6 @@ func (n *Print) Attributes() map[string]interface{} {
return nil
}
func (n *Print) Position() *node.Position {
return n.position
}
func (n *Print) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Print) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,14 +5,12 @@ import (
)
type PropertyFetch struct {
position *node.Position
Variable node.Node
Property node.Node
}
func NewPropertyFetch(Variable node.Node, Property node.Node) *PropertyFetch {
return &PropertyFetch{
nil,
Variable,
Property,
}
@ -22,15 +20,6 @@ func (n *PropertyFetch) Attributes() map[string]interface{} {
return nil
}
func (n *PropertyFetch) Position() *node.Position {
return n.position
}
func (n *PropertyFetch) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *PropertyFetch) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,13 +5,11 @@ import (
)
type Require struct {
position *node.Position
Expr node.Node
Expr node.Node
}
func NewRequire(Expression node.Node) *Require {
return &Require{
nil,
Expression,
}
}
@ -20,15 +18,6 @@ func (n *Require) Attributes() map[string]interface{} {
return nil
}
func (n *Require) Position() *node.Position {
return n.position
}
func (n *Require) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Require) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,13 +5,11 @@ import (
)
type RequireOnce struct {
position *node.Position
Expr node.Node
Expr node.Node
}
func NewRequireOnce(Expression node.Node) *RequireOnce {
return &RequireOnce{
nil,
Expression,
}
}
@ -20,15 +18,6 @@ func (n *RequireOnce) Attributes() map[string]interface{} {
return nil
}
func (n *RequireOnce) Position() *node.Position {
return n.position
}
func (n *RequireOnce) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *RequireOnce) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,13 +5,11 @@ import (
)
type ShellExec struct {
position *node.Position
Parts []node.Node
Parts []node.Node
}
func NewShellExec(Parts []node.Node) *ShellExec {
return &ShellExec{
nil,
Parts,
}
}
@ -20,15 +18,6 @@ func (n *ShellExec) Attributes() map[string]interface{} {
return nil
}
func (n *ShellExec) Position() *node.Position {
return n.position
}
func (n *ShellExec) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *ShellExec) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,13 +5,11 @@ import (
)
type ShortArray struct {
position *node.Position
Items []node.Node
Items []node.Node
}
func NewShortArray(Items []node.Node) *ShortArray {
return &ShortArray{
nil,
Items,
}
}
@ -20,15 +18,6 @@ func (n *ShortArray) Attributes() map[string]interface{} {
return nil
}
func (n *ShortArray) Position() *node.Position {
return n.position
}
func (n *ShortArray) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *ShortArray) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,13 +5,11 @@ import (
)
type ShortList struct {
position *node.Position
Items []node.Node
Items []node.Node
}
func NewShortList(Items []node.Node) *ShortList {
return &ShortList{
nil,
Items,
}
}
@ -20,15 +18,6 @@ func (n *ShortList) Attributes() map[string]interface{} {
return nil
}
func (n *ShortList) Position() *node.Position {
return n.position
}
func (n *ShortList) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *ShortList) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,7 +5,6 @@ import (
)
type StaticCall struct {
position *node.Position
Class node.Node
Call node.Node
Arguments []node.Node
@ -13,7 +12,6 @@ type StaticCall struct {
func NewStaticCall(Class node.Node, Call node.Node, Arguments []node.Node) *StaticCall {
return &StaticCall{
nil,
Class,
Call,
Arguments,
@ -24,15 +22,6 @@ func (n *StaticCall) Attributes() map[string]interface{} {
return nil
}
func (n *StaticCall) Position() *node.Position {
return n.position
}
func (n *StaticCall) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *StaticCall) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,14 +5,12 @@ import (
)
type StaticPropertyFetch struct {
position *node.Position
Class node.Node
Property node.Node
}
func NewStaticPropertyFetch(Class node.Node, Property node.Node) *StaticPropertyFetch {
return &StaticPropertyFetch{
nil,
Class,
Property,
}
@ -22,15 +20,6 @@ func (n *StaticPropertyFetch) Attributes() map[string]interface{} {
return nil
}
func (n *StaticPropertyFetch) Position() *node.Position {
return n.position
}
func (n *StaticPropertyFetch) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *StaticPropertyFetch) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,7 +5,6 @@ import (
)
type Ternary struct {
position *node.Position
Condition node.Node
IfTrue node.Node
IfFalse node.Node
@ -13,7 +12,6 @@ type Ternary struct {
func NewTernary(Condition node.Node, IfTrue node.Node, IfFalse node.Node) *Ternary {
return &Ternary{
nil,
Condition,
IfTrue,
IfFalse,
@ -24,15 +22,6 @@ func (n *Ternary) Attributes() map[string]interface{} {
return nil
}
func (n *Ternary) Position() *node.Position {
return n.position
}
func (n *Ternary) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Ternary) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,13 +5,11 @@ import (
)
type UnaryMinus struct {
position *node.Position
Expr node.Node
Expr node.Node
}
func NewUnaryMinus(Expression node.Node) *UnaryMinus {
return &UnaryMinus{
nil,
Expression,
}
}
@ -20,15 +18,6 @@ func (n *UnaryMinus) Attributes() map[string]interface{} {
return nil
}
func (n *UnaryMinus) Position() *node.Position {
return n.position
}
func (n *UnaryMinus) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *UnaryMinus) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,13 +5,11 @@ import (
)
type UnaryPlus struct {
position *node.Position
Expr node.Node
Expr node.Node
}
func NewUnaryPlus(Expression node.Node) *UnaryPlus {
return &UnaryPlus{
nil,
Expression,
}
}
@ -20,15 +18,6 @@ func (n *UnaryPlus) Attributes() map[string]interface{} {
return nil
}
func (n *UnaryPlus) Position() *node.Position {
return n.position
}
func (n *UnaryPlus) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *UnaryPlus) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,13 +5,11 @@ import (
)
type Variable struct {
position *node.Position
VarName node.Node
VarName node.Node
}
func NewVariable(VarName node.Node) *Variable {
return &Variable{
nil,
VarName,
}
}
@ -20,15 +18,6 @@ func (n *Variable) Attributes() map[string]interface{} {
return nil
}
func (n *Variable) Position() *node.Position {
return n.position
}
func (n *Variable) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Variable) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,14 +5,12 @@ import (
)
type Yield struct {
position *node.Position
Key node.Node
Value node.Node
Key node.Node
Value node.Node
}
func NewYield(Key node.Node, Value node.Node) *Yield {
return &Yield{
nil,
Key,
Value,
}
@ -22,15 +20,6 @@ func (n *Yield) Attributes() map[string]interface{} {
return nil
}
func (n *Yield) Position() *node.Position {
return n.position
}
func (n *Yield) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Yield) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,13 +5,11 @@ import (
)
type YieldFrom struct {
position *node.Position
Expr node.Node
Expr node.Node
}
func NewYieldFrom(Expression node.Node) *YieldFrom {
return &YieldFrom{
nil,
Expression,
}
}
@ -20,15 +18,6 @@ func (n *YieldFrom) Attributes() map[string]interface{} {
return nil
}
func (n *YieldFrom) Position() *node.Position {
return n.position
}
func (n *YieldFrom) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *YieldFrom) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -1,13 +1,11 @@
package node
type Identifier struct {
position *Position
Value string
Value string
}
func NewIdentifier(Value string) *Identifier {
return &Identifier{
nil,
Value,
}
}
@ -18,15 +16,6 @@ func (n *Identifier) Attributes() map[string]interface{} {
}
}
func (n *Identifier) Position() *Position {
return n.position
}
func (n *Identifier) SetPosition(p *Position) Node {
n.position = p
return n
}
func (n *Identifier) Walk(v Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type FullyQualified struct {
func NewFullyQualified(Parts []node.Node) *FullyQualified {
return &FullyQualified{
Name{
nil,
Parts,
},
}

View File

@ -5,13 +5,11 @@ import (
)
type Name struct {
position *node.Position
Parts []node.Node
Parts []node.Node
}
func NewName(Parts []node.Node) *Name {
return &Name{
nil,
Parts,
}
}
@ -20,15 +18,6 @@ func (n *Name) Attributes() map[string]interface{} {
return nil
}
func (n *Name) Position() *node.Position {
return n.position
}
func (n *Name) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *Name) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -5,13 +5,11 @@ import (
)
type NamePart struct {
position *node.Position
Value string
Value string
}
func NewNamePart(Value string) *NamePart {
return &NamePart{
nil,
Value,
}
}
@ -22,15 +20,6 @@ func (n *NamePart) Attributes() map[string]interface{} {
}
}
func (n *NamePart) Position() *node.Position {
return n.position
}
func (n *NamePart) SetPosition(p *node.Position) node.Node {
n.position = p
return n
}
func (n *NamePart) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -11,7 +11,6 @@ type Relative struct {
func NewRelative(Parts []node.Node) *Relative {
return &Relative{
Name{
nil,
Parts,
},
}

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