remove unused attributes fields

This commit is contained in:
z7zmey 2018-01-05 00:12:01 +02:00
parent 469db8f9e2
commit 17bca8d1dc
156 changed files with 739 additions and 996 deletions

View File

@ -1,34 +1,23 @@
package node package node
type Argument struct { type Argument struct {
attributes map[string]interface{} position *Position
position *Position Variadic bool
expr Node Expr Node
variadic bool
} }
func NewArgument(Expression Node, variadic bool) Node { func NewArgument(Expression Node, Variadic bool) Node {
return &Argument{ return &Argument{
map[string]interface{}{
"variadic": variadic,
},
nil, nil,
Variadic,
Expression, Expression,
variadic,
} }
} }
func (n Argument) Attributes() map[string]interface{} { func (n Argument) Attributes() map[string]interface{} {
return n.attributes return map[string]interface{}{
} "Variadic": n.Variadic,
}
func (n Argument) Attribute(Key string) interface{} {
return n.attributes[Key]
}
func (n Argument) SetAttribute(Key string, Value interface{}) Node {
n.attributes[Key] = Value
return n
} }
func (n Argument) Position() *Position { func (n Argument) Position() *Position {
@ -45,9 +34,9 @@ func (n Argument) Walk(v Visitor) {
return return
} }
if n.expr != nil { if n.Expr != nil {
vv := v.GetChildrenVisitor("expr") vv := v.GetChildrenVisitor("Expr")
n.expr.Walk(vv) n.Expr.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -5,21 +5,19 @@ import (
) )
type Array struct { type Array struct {
attributes map[string]interface{} position *node.Position
position *node.Position Items []node.Node
Items []node.Node
} }
func NewArray(Items []node.Node) node.Node { func NewArray(Items []node.Node) node.Node {
return &Array{ return &Array{
map[string]interface{}{},
nil, nil,
Items, Items,
} }
} }
func (n Array) Attributes() map[string]interface{} { func (n Array) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n Array) Position() *node.Position { func (n Array) Position() *node.Position {

View File

@ -5,15 +5,13 @@ import (
) )
type ArrayDimFetch struct { type ArrayDimFetch struct {
attributes map[string]interface{} position *node.Position
position *node.Position Variable node.Node
Variable node.Node Dim node.Node
Dim node.Node
} }
func NewArrayDimFetch(Variable node.Node, Dim node.Node) node.Node { func NewArrayDimFetch(Variable node.Node, Dim node.Node) node.Node {
return &ArrayDimFetch{ return &ArrayDimFetch{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Dim, Dim,
@ -21,7 +19,7 @@ func NewArrayDimFetch(Variable node.Node, Dim node.Node) node.Node {
} }
func (n ArrayDimFetch) Attributes() map[string]interface{} { func (n ArrayDimFetch) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n ArrayDimFetch) Position() *node.Position { func (n ArrayDimFetch) Position() *node.Position {

View File

@ -5,25 +5,25 @@ import (
) )
type ArrayItem struct { type ArrayItem struct {
attributes map[string]interface{} position *node.Position
position *node.Position ByRef bool
Key node.Node Key node.Node
Val node.Node Val node.Node
} }
func NewArrayItem(Key node.Node, Val node.Node, byRef bool) node.Node { func NewArrayItem(Key node.Node, Val node.Node, ByRef bool) node.Node {
return &ArrayItem{ return &ArrayItem{
map[string]interface{}{
"byRef": byRef,
},
nil, nil,
ByRef,
Key, Key,
Val, Val,
} }
} }
func (n ArrayItem) Attributes() map[string]interface{} { func (n ArrayItem) Attributes() map[string]interface{} {
return n.attributes return map[string]interface{}{
"ByRef": n.ByRef,
}
} }
func (n ArrayItem) Position() *node.Position { func (n ArrayItem) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type Assign struct {
func NewAssign(Variable node.Node, Expression node.Node) node.Node { func NewAssign(Variable node.Node, Expression node.Node) node.Node {
return &Assign{ return &Assign{
AssignOp{ AssignOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewAssign(Variable node.Node, Expression node.Node) node.Node {
} }
func (n Assign) Attributes() map[string]interface{} { func (n Assign) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n Assign) Position() *node.Position { func (n Assign) Position() *node.Position {

View File

@ -5,7 +5,6 @@ import (
) )
type AssignOp struct { type AssignOp struct {
attributes map[string]interface{}
position *node.Position position *node.Position
Variable node.Node Variable node.Node
Expression node.Node Expression node.Node

View File

@ -11,7 +11,6 @@ type AssignRef struct {
func NewAssignRef(Variable node.Node, Expression node.Node) node.Node { func NewAssignRef(Variable node.Node, Expression node.Node) node.Node {
return &AssignRef{ return &AssignRef{
AssignOp{ AssignOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewAssignRef(Variable node.Node, Expression node.Node) node.Node {
} }
func (n AssignRef) Attributes() map[string]interface{} { func (n AssignRef) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n AssignRef) Position() *node.Position { func (n AssignRef) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type BitwiseAnd struct {
func NewBitwiseAnd(Variable node.Node, Expression node.Node) node.Node { func NewBitwiseAnd(Variable node.Node, Expression node.Node) node.Node {
return &BitwiseAnd{ return &BitwiseAnd{
AssignOp{ AssignOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewBitwiseAnd(Variable node.Node, Expression node.Node) node.Node {
} }
func (n BitwiseAnd) Attributes() map[string]interface{} { func (n BitwiseAnd) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n BitwiseAnd) Position() *node.Position { func (n BitwiseAnd) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type BitwiseOr struct {
func NewBitwiseOr(Variable node.Node, Expression node.Node) node.Node { func NewBitwiseOr(Variable node.Node, Expression node.Node) node.Node {
return &BitwiseOr{ return &BitwiseOr{
AssignOp{ AssignOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewBitwiseOr(Variable node.Node, Expression node.Node) node.Node {
} }
func (n BitwiseOr) Attributes() map[string]interface{} { func (n BitwiseOr) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n BitwiseOr) Position() *node.Position { func (n BitwiseOr) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type BitwiseXor struct {
func NewBitwiseXor(Variable node.Node, Expression node.Node) node.Node { func NewBitwiseXor(Variable node.Node, Expression node.Node) node.Node {
return &BitwiseXor{ return &BitwiseXor{
AssignOp{ AssignOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewBitwiseXor(Variable node.Node, Expression node.Node) node.Node {
} }
func (n BitwiseXor) Attributes() map[string]interface{} { func (n BitwiseXor) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n BitwiseXor) Position() *node.Position { func (n BitwiseXor) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type Concat struct {
func NewConcat(Variable node.Node, Expression node.Node) node.Node { func NewConcat(Variable node.Node, Expression node.Node) node.Node {
return &Concat{ return &Concat{
AssignOp{ AssignOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewConcat(Variable node.Node, Expression node.Node) node.Node {
} }
func (n Concat) Attributes() map[string]interface{} { func (n Concat) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n Concat) Position() *node.Position { func (n Concat) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type Div struct {
func NewDiv(Variable node.Node, Expression node.Node) node.Node { func NewDiv(Variable node.Node, Expression node.Node) node.Node {
return &Div{ return &Div{
AssignOp{ AssignOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewDiv(Variable node.Node, Expression node.Node) node.Node {
} }
func (n Div) Attributes() map[string]interface{} { func (n Div) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n Div) Position() *node.Position { func (n Div) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type Minus struct {
func NewMinus(Variable node.Node, Expression node.Node) node.Node { func NewMinus(Variable node.Node, Expression node.Node) node.Node {
return &Minus{ return &Minus{
AssignOp{ AssignOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewMinus(Variable node.Node, Expression node.Node) node.Node {
} }
func (n Minus) Attributes() map[string]interface{} { func (n Minus) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n Minus) Position() *node.Position { func (n Minus) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type Mod struct {
func NewMod(Variable node.Node, Expression node.Node) node.Node { func NewMod(Variable node.Node, Expression node.Node) node.Node {
return &Mod{ return &Mod{
AssignOp{ AssignOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewMod(Variable node.Node, Expression node.Node) node.Node {
} }
func (n Mod) Attributes() map[string]interface{} { func (n Mod) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n Mod) Position() *node.Position { func (n Mod) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type Mul struct {
func NewMul(Variable node.Node, Expression node.Node) node.Node { func NewMul(Variable node.Node, Expression node.Node) node.Node {
return &Mul{ return &Mul{
AssignOp{ AssignOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewMul(Variable node.Node, Expression node.Node) node.Node {
} }
func (n Mul) Attributes() map[string]interface{} { func (n Mul) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n Mul) Position() *node.Position { func (n Mul) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type Plus struct {
func NewPlus(Variable node.Node, Expression node.Node) node.Node { func NewPlus(Variable node.Node, Expression node.Node) node.Node {
return &Plus{ return &Plus{
AssignOp{ AssignOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewPlus(Variable node.Node, Expression node.Node) node.Node {
} }
func (n Plus) Attributes() map[string]interface{} { func (n Plus) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n Plus) Position() *node.Position { func (n Plus) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type Pow struct {
func NewPow(Variable node.Node, Expression node.Node) node.Node { func NewPow(Variable node.Node, Expression node.Node) node.Node {
return &Pow{ return &Pow{
AssignOp{ AssignOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewPow(Variable node.Node, Expression node.Node) node.Node {
} }
func (n Pow) Attributes() map[string]interface{} { func (n Pow) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n Pow) Position() *node.Position { func (n Pow) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type ShiftLeft struct {
func NewShiftLeft(Variable node.Node, Expression node.Node) node.Node { func NewShiftLeft(Variable node.Node, Expression node.Node) node.Node {
return &ShiftLeft{ return &ShiftLeft{
AssignOp{ AssignOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewShiftLeft(Variable node.Node, Expression node.Node) node.Node {
} }
func (n ShiftLeft) Attributes() map[string]interface{} { func (n ShiftLeft) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n ShiftLeft) Position() *node.Position { func (n ShiftLeft) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type ShiftRight struct {
func NewShiftRight(Variable node.Node, Expression node.Node) node.Node { func NewShiftRight(Variable node.Node, Expression node.Node) node.Node {
return &ShiftRight{ return &ShiftRight{
AssignOp{ AssignOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewShiftRight(Variable node.Node, Expression node.Node) node.Node {
} }
func (n ShiftRight) Attributes() map[string]interface{} { func (n ShiftRight) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n ShiftRight) Position() *node.Position { func (n ShiftRight) Position() *node.Position {

View File

@ -5,8 +5,7 @@ import (
) )
type BinaryOp struct { type BinaryOp struct {
attributes map[string]interface{} position *node.Position
position *node.Position Left node.Node
Left node.Node Right node.Node
Right node.Node
} }

View File

@ -11,7 +11,6 @@ type BitwiseAnd struct {
func NewBitwiseAnd(Variable node.Node, Expression node.Node) node.Node { func NewBitwiseAnd(Variable node.Node, Expression node.Node) node.Node {
return &BitwiseAnd{ return &BitwiseAnd{
BinaryOp{ BinaryOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewBitwiseAnd(Variable node.Node, Expression node.Node) node.Node {
} }
func (n BitwiseAnd) Attributes() map[string]interface{} { func (n BitwiseAnd) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n BitwiseAnd) Position() *node.Position { func (n BitwiseAnd) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type BitwiseOr struct {
func NewBitwiseOr(Variable node.Node, Expression node.Node) node.Node { func NewBitwiseOr(Variable node.Node, Expression node.Node) node.Node {
return &BitwiseOr{ return &BitwiseOr{
BinaryOp{ BinaryOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewBitwiseOr(Variable node.Node, Expression node.Node) node.Node {
} }
func (n BitwiseOr) Attributes() map[string]interface{} { func (n BitwiseOr) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n BitwiseOr) Position() *node.Position { func (n BitwiseOr) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type BitwiseXor struct {
func NewBitwiseXor(Variable node.Node, Expression node.Node) node.Node { func NewBitwiseXor(Variable node.Node, Expression node.Node) node.Node {
return &BitwiseXor{ return &BitwiseXor{
BinaryOp{ BinaryOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewBitwiseXor(Variable node.Node, Expression node.Node) node.Node {
} }
func (n BitwiseXor) Attributes() map[string]interface{} { func (n BitwiseXor) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n BitwiseXor) Position() *node.Position { func (n BitwiseXor) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type BooleanAnd struct {
func NewBooleanAnd(Variable node.Node, Expression node.Node) node.Node { func NewBooleanAnd(Variable node.Node, Expression node.Node) node.Node {
return &BooleanAnd{ return &BooleanAnd{
BinaryOp{ BinaryOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewBooleanAnd(Variable node.Node, Expression node.Node) node.Node {
} }
func (n BooleanAnd) Attributes() map[string]interface{} { func (n BooleanAnd) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n BooleanAnd) Position() *node.Position { func (n BooleanAnd) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type BooleanOr struct {
func NewBooleanOr(Variable node.Node, Expression node.Node) node.Node { func NewBooleanOr(Variable node.Node, Expression node.Node) node.Node {
return &BooleanOr{ return &BooleanOr{
BinaryOp{ BinaryOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewBooleanOr(Variable node.Node, Expression node.Node) node.Node {
} }
func (n BooleanOr) Attributes() map[string]interface{} { func (n BooleanOr) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n BooleanOr) Position() *node.Position { func (n BooleanOr) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type Coalesce struct {
func NewCoalesce(Variable node.Node, Expression node.Node) node.Node { func NewCoalesce(Variable node.Node, Expression node.Node) node.Node {
return &Coalesce{ return &Coalesce{
BinaryOp{ BinaryOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewCoalesce(Variable node.Node, Expression node.Node) node.Node {
} }
func (n Coalesce) Attributes() map[string]interface{} { func (n Coalesce) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n Coalesce) Position() *node.Position { func (n Coalesce) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type Concat struct {
func NewConcat(Variable node.Node, Expression node.Node) node.Node { func NewConcat(Variable node.Node, Expression node.Node) node.Node {
return &Concat{ return &Concat{
BinaryOp{ BinaryOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewConcat(Variable node.Node, Expression node.Node) node.Node {
} }
func (n Concat) Attributes() map[string]interface{} { func (n Concat) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n Concat) Position() *node.Position { func (n Concat) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type Div struct {
func NewDiv(Variable node.Node, Expression node.Node) node.Node { func NewDiv(Variable node.Node, Expression node.Node) node.Node {
return &Div{ return &Div{
BinaryOp{ BinaryOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewDiv(Variable node.Node, Expression node.Node) node.Node {
} }
func (n Div) Attributes() map[string]interface{} { func (n Div) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n Div) Position() *node.Position { func (n Div) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type Equal struct {
func NewEqual(Variable node.Node, Expression node.Node) node.Node { func NewEqual(Variable node.Node, Expression node.Node) node.Node {
return &Equal{ return &Equal{
BinaryOp{ BinaryOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewEqual(Variable node.Node, Expression node.Node) node.Node {
} }
func (n Equal) Attributes() map[string]interface{} { func (n Equal) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n Equal) Position() *node.Position { func (n Equal) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type Greater struct {
func NewGreater(Variable node.Node, Expression node.Node) node.Node { func NewGreater(Variable node.Node, Expression node.Node) node.Node {
return &Greater{ return &Greater{
BinaryOp{ BinaryOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewGreater(Variable node.Node, Expression node.Node) node.Node {
} }
func (n Greater) Attributes() map[string]interface{} { func (n Greater) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n Greater) Position() *node.Position { func (n Greater) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type GreaterOrEqual struct {
func NewGreaterOrEqual(Variable node.Node, Expression node.Node) node.Node { func NewGreaterOrEqual(Variable node.Node, Expression node.Node) node.Node {
return &GreaterOrEqual{ return &GreaterOrEqual{
BinaryOp{ BinaryOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewGreaterOrEqual(Variable node.Node, Expression node.Node) node.Node {
} }
func (n GreaterOrEqual) Attributes() map[string]interface{} { func (n GreaterOrEqual) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n GreaterOrEqual) Position() *node.Position { func (n GreaterOrEqual) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type Identical struct {
func NewIdentical(Variable node.Node, Expression node.Node) node.Node { func NewIdentical(Variable node.Node, Expression node.Node) node.Node {
return &Identical{ return &Identical{
BinaryOp{ BinaryOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewIdentical(Variable node.Node, Expression node.Node) node.Node {
} }
func (n Identical) Attributes() map[string]interface{} { func (n Identical) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n Identical) Position() *node.Position { func (n Identical) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type LogicalAnd struct {
func NewLogicalAnd(Variable node.Node, Expression node.Node) node.Node { func NewLogicalAnd(Variable node.Node, Expression node.Node) node.Node {
return &LogicalAnd{ return &LogicalAnd{
BinaryOp{ BinaryOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewLogicalAnd(Variable node.Node, Expression node.Node) node.Node {
} }
func (n LogicalAnd) Attributes() map[string]interface{} { func (n LogicalAnd) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n LogicalAnd) Position() *node.Position { func (n LogicalAnd) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type LogicalOr struct {
func NewLogicalOr(Variable node.Node, Expression node.Node) node.Node { func NewLogicalOr(Variable node.Node, Expression node.Node) node.Node {
return &LogicalOr{ return &LogicalOr{
BinaryOp{ BinaryOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewLogicalOr(Variable node.Node, Expression node.Node) node.Node {
} }
func (n LogicalOr) Attributes() map[string]interface{} { func (n LogicalOr) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n LogicalOr) Position() *node.Position { func (n LogicalOr) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type LogicalXor struct {
func NewLogicalXor(Variable node.Node, Expression node.Node) node.Node { func NewLogicalXor(Variable node.Node, Expression node.Node) node.Node {
return &LogicalXor{ return &LogicalXor{
BinaryOp{ BinaryOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewLogicalXor(Variable node.Node, Expression node.Node) node.Node {
} }
func (n LogicalXor) Attributes() map[string]interface{} { func (n LogicalXor) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n LogicalXor) Position() *node.Position { func (n LogicalXor) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type Minus struct {
func NewMinus(Variable node.Node, Expression node.Node) node.Node { func NewMinus(Variable node.Node, Expression node.Node) node.Node {
return &Minus{ return &Minus{
BinaryOp{ BinaryOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewMinus(Variable node.Node, Expression node.Node) node.Node {
} }
func (n Minus) Attributes() map[string]interface{} { func (n Minus) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n Minus) Position() *node.Position { func (n Minus) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type Mod struct {
func NewMod(Variable node.Node, Expression node.Node) node.Node { func NewMod(Variable node.Node, Expression node.Node) node.Node {
return &Mod{ return &Mod{
BinaryOp{ BinaryOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewMod(Variable node.Node, Expression node.Node) node.Node {
} }
func (n Mod) Attributes() map[string]interface{} { func (n Mod) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n Mod) Position() *node.Position { func (n Mod) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type Mul struct {
func NewMul(Variable node.Node, Expression node.Node) node.Node { func NewMul(Variable node.Node, Expression node.Node) node.Node {
return &Mul{ return &Mul{
BinaryOp{ BinaryOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewMul(Variable node.Node, Expression node.Node) node.Node {
} }
func (n Mul) Attributes() map[string]interface{} { func (n Mul) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n Mul) Position() *node.Position { func (n Mul) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type NotEqual struct {
func NewNotEqual(Variable node.Node, Expression node.Node) node.Node { func NewNotEqual(Variable node.Node, Expression node.Node) node.Node {
return &NotEqual{ return &NotEqual{
BinaryOp{ BinaryOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewNotEqual(Variable node.Node, Expression node.Node) node.Node {
} }
func (n NotEqual) Attributes() map[string]interface{} { func (n NotEqual) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n NotEqual) Position() *node.Position { func (n NotEqual) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type NotIdentical struct {
func NewNotIdentical(Variable node.Node, Expression node.Node) node.Node { func NewNotIdentical(Variable node.Node, Expression node.Node) node.Node {
return &NotIdentical{ return &NotIdentical{
BinaryOp{ BinaryOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewNotIdentical(Variable node.Node, Expression node.Node) node.Node {
} }
func (n NotIdentical) Attributes() map[string]interface{} { func (n NotIdentical) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n NotIdentical) Position() *node.Position { func (n NotIdentical) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type Plus struct {
func NewPlus(Variable node.Node, Expression node.Node) node.Node { func NewPlus(Variable node.Node, Expression node.Node) node.Node {
return &Plus{ return &Plus{
BinaryOp{ BinaryOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewPlus(Variable node.Node, Expression node.Node) node.Node {
} }
func (n Plus) Attributes() map[string]interface{} { func (n Plus) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n Plus) Position() *node.Position { func (n Plus) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type Pow struct {
func NewPow(Variable node.Node, Expression node.Node) node.Node { func NewPow(Variable node.Node, Expression node.Node) node.Node {
return &Pow{ return &Pow{
BinaryOp{ BinaryOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewPow(Variable node.Node, Expression node.Node) node.Node {
} }
func (n Pow) Attributes() map[string]interface{} { func (n Pow) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n Pow) Position() *node.Position { func (n Pow) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type ShiftLeft struct {
func NewShiftLeft(Variable node.Node, Expression node.Node) node.Node { func NewShiftLeft(Variable node.Node, Expression node.Node) node.Node {
return &ShiftLeft{ return &ShiftLeft{
BinaryOp{ BinaryOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewShiftLeft(Variable node.Node, Expression node.Node) node.Node {
} }
func (n ShiftLeft) Attributes() map[string]interface{} { func (n ShiftLeft) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n ShiftLeft) Position() *node.Position { func (n ShiftLeft) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type ShiftRight struct {
func NewShiftRight(Variable node.Node, Expression node.Node) node.Node { func NewShiftRight(Variable node.Node, Expression node.Node) node.Node {
return &ShiftRight{ return &ShiftRight{
BinaryOp{ BinaryOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewShiftRight(Variable node.Node, Expression node.Node) node.Node {
} }
func (n ShiftRight) Attributes() map[string]interface{} { func (n ShiftRight) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n ShiftRight) Position() *node.Position { func (n ShiftRight) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type Smaller struct {
func NewSmaller(Variable node.Node, Expression node.Node) node.Node { func NewSmaller(Variable node.Node, Expression node.Node) node.Node {
return &Smaller{ return &Smaller{
BinaryOp{ BinaryOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewSmaller(Variable node.Node, Expression node.Node) node.Node {
} }
func (n Smaller) Attributes() map[string]interface{} { func (n Smaller) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n Smaller) Position() *node.Position { func (n Smaller) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type SmallerOrEqual struct {
func NewSmallerOrEqual(Variable node.Node, Expression node.Node) node.Node { func NewSmallerOrEqual(Variable node.Node, Expression node.Node) node.Node {
return &SmallerOrEqual{ return &SmallerOrEqual{
BinaryOp{ BinaryOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewSmallerOrEqual(Variable node.Node, Expression node.Node) node.Node {
} }
func (n SmallerOrEqual) Attributes() map[string]interface{} { func (n SmallerOrEqual) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n SmallerOrEqual) Position() *node.Position { func (n SmallerOrEqual) Position() *node.Position {

View File

@ -11,7 +11,6 @@ type Spaceship struct {
func NewSpaceship(Variable node.Node, Expression node.Node) node.Node { func NewSpaceship(Variable node.Node, Expression node.Node) node.Node {
return &Spaceship{ return &Spaceship{
BinaryOp{ BinaryOp{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Expression, Expression,
@ -20,7 +19,7 @@ func NewSpaceship(Variable node.Node, Expression node.Node) node.Node {
} }
func (n Spaceship) Attributes() map[string]interface{} { func (n Spaceship) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n Spaceship) Position() *node.Position { func (n Spaceship) Position() *node.Position {

View File

@ -5,21 +5,19 @@ import (
) )
type BitwiseNot struct { type BitwiseNot struct {
attributes map[string]interface{} position *node.Position
position *node.Position Expr node.Node
expr node.Node
} }
func NewBitwiseNot(Expression node.Node) node.Node { func NewBitwiseNot(Expression node.Node) node.Node {
return &BitwiseNot{ return &BitwiseNot{
map[string]interface{}{},
nil, nil,
Expression, Expression,
} }
} }
func (n BitwiseNot) Attributes() map[string]interface{} { func (n BitwiseNot) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n BitwiseNot) Position() *node.Position { func (n BitwiseNot) Position() *node.Position {
@ -36,9 +34,9 @@ func (n BitwiseNot) Walk(v node.Visitor) {
return return
} }
if n.expr != nil { if n.Expr != nil {
vv := v.GetChildrenVisitor("expr") vv := v.GetChildrenVisitor("Expr")
n.expr.Walk(vv) n.Expr.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -5,21 +5,19 @@ import (
) )
type BooleanNot struct { type BooleanNot struct {
attributes map[string]interface{} position *node.Position
position *node.Position Expr node.Node
expr node.Node
} }
func NewBooleanNot(Expression node.Node) node.Node { func NewBooleanNot(Expression node.Node) node.Node {
return &BooleanNot{ return &BooleanNot{
map[string]interface{}{},
nil, nil,
Expression, Expression,
} }
} }
func (n BooleanNot) Attributes() map[string]interface{} { func (n BooleanNot) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n BooleanNot) Position() *node.Position { func (n BooleanNot) Position() *node.Position {
@ -36,9 +34,9 @@ func (n BooleanNot) Walk(v node.Visitor) {
return return
} }
if n.expr != nil { if n.Expr != nil {
vv := v.GetChildrenVisitor("expr") vv := v.GetChildrenVisitor("Expr")
n.expr.Walk(vv) n.Expr.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -5,7 +5,6 @@ import (
) )
type Cast struct { type Cast struct {
attributes map[string]interface{} position *node.Position
position *node.Position Expr node.Node
expr node.Node
} }

View File

@ -8,18 +8,17 @@ type CastArray struct {
Cast Cast
} }
func NewCastArray(expr node.Node) node.Node { func NewCastArray(Expr node.Node) node.Node {
return &CastArray{ return &CastArray{
Cast{ Cast{
map[string]interface{}{},
nil, nil,
expr, Expr,
}, },
} }
} }
func (n CastArray) Attributes() map[string]interface{} { func (n CastArray) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n CastArray) Position() *node.Position { func (n CastArray) Position() *node.Position {
@ -36,9 +35,9 @@ func (n CastArray) Walk(v node.Visitor) {
return return
} }
if n.expr != nil { if n.Expr != nil {
vv := v.GetChildrenVisitor("expr") vv := v.GetChildrenVisitor("Expr")
n.expr.Walk(vv) n.Expr.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,18 +8,17 @@ type CastBool struct {
Cast Cast
} }
func NewCastBool(expr node.Node) node.Node { func NewCastBool(Expr node.Node) node.Node {
return &CastBool{ return &CastBool{
Cast{ Cast{
map[string]interface{}{},
nil, nil,
expr, Expr,
}, },
} }
} }
func (n CastBool) Attributes() map[string]interface{} { func (n CastBool) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n CastBool) Position() *node.Position { func (n CastBool) Position() *node.Position {
@ -36,9 +35,9 @@ func (n CastBool) Walk(v node.Visitor) {
return return
} }
if n.expr != nil { if n.Expr != nil {
vv := v.GetChildrenVisitor("expr") vv := v.GetChildrenVisitor("Expr")
n.expr.Walk(vv) n.Expr.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,18 +8,17 @@ type CastDouble struct {
Cast Cast
} }
func NewCastDouble(expr node.Node) node.Node { func NewCastDouble(Expr node.Node) node.Node {
return &CastDouble{ return &CastDouble{
Cast{ Cast{
map[string]interface{}{},
nil, nil,
expr, Expr,
}, },
} }
} }
func (n CastDouble) Attributes() map[string]interface{} { func (n CastDouble) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n CastDouble) Position() *node.Position { func (n CastDouble) Position() *node.Position {
@ -36,9 +35,9 @@ func (n CastDouble) Walk(v node.Visitor) {
return return
} }
if n.expr != nil { if n.Expr != nil {
vv := v.GetChildrenVisitor("expr") vv := v.GetChildrenVisitor("Expr")
n.expr.Walk(vv) n.Expr.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,18 +8,17 @@ type CastInt struct {
Cast Cast
} }
func NewCastInt(expr node.Node) node.Node { func NewCastInt(Expr node.Node) node.Node {
return &CastInt{ return &CastInt{
Cast{ Cast{
map[string]interface{}{},
nil, nil,
expr, Expr,
}, },
} }
} }
func (n CastInt) Attributes() map[string]interface{} { func (n CastInt) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n CastInt) Position() *node.Position { func (n CastInt) Position() *node.Position {
@ -36,9 +35,9 @@ func (n CastInt) Walk(v node.Visitor) {
return return
} }
if n.expr != nil { if n.Expr != nil {
vv := v.GetChildrenVisitor("expr") vv := v.GetChildrenVisitor("Expr")
n.expr.Walk(vv) n.Expr.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,18 +8,17 @@ type CastObject struct {
Cast Cast
} }
func NewCastObject(expr node.Node) node.Node { func NewCastObject(Expr node.Node) node.Node {
return &CastObject{ return &CastObject{
Cast{ Cast{
map[string]interface{}{},
nil, nil,
expr, Expr,
}, },
} }
} }
func (n CastObject) Attributes() map[string]interface{} { func (n CastObject) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n CastObject) Position() *node.Position { func (n CastObject) Position() *node.Position {
@ -36,9 +35,9 @@ func (n CastObject) Walk(v node.Visitor) {
return return
} }
if n.expr != nil { if n.Expr != nil {
vv := v.GetChildrenVisitor("expr") vv := v.GetChildrenVisitor("Expr")
n.expr.Walk(vv) n.Expr.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,18 +8,17 @@ type CastString struct {
Cast Cast
} }
func NewCastString(expr node.Node) node.Node { func NewCastString(Expr node.Node) node.Node {
return &CastString{ return &CastString{
Cast{ Cast{
map[string]interface{}{},
nil, nil,
expr, Expr,
}, },
} }
} }
func (n CastString) Attributes() map[string]interface{} { func (n CastString) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n CastString) Position() *node.Position { func (n CastString) Position() *node.Position {
@ -36,9 +35,9 @@ func (n CastString) Walk(v node.Visitor) {
return return
} }
if n.expr != nil { if n.Expr != nil {
vv := v.GetChildrenVisitor("expr") vv := v.GetChildrenVisitor("Expr")
n.expr.Walk(vv) n.Expr.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -8,18 +8,17 @@ type CastUnset struct {
Cast Cast
} }
func NewCastUnset(expr node.Node) node.Node { func NewCastUnset(Expr node.Node) node.Node {
return &CastUnset{ return &CastUnset{
Cast{ Cast{
map[string]interface{}{},
nil, nil,
expr, Expr,
}, },
} }
} }
func (n CastUnset) Attributes() map[string]interface{} { func (n CastUnset) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n CastUnset) Position() *node.Position { func (n CastUnset) Position() *node.Position {
@ -36,9 +35,9 @@ func (n CastUnset) Walk(v node.Visitor) {
return return
} }
if n.expr != nil { if n.Expr != nil {
vv := v.GetChildrenVisitor("expr") vv := v.GetChildrenVisitor("Expr")
n.expr.Walk(vv) n.Expr.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -5,7 +5,6 @@ import (
) )
type ClassConstFetch struct { type ClassConstFetch struct {
attributes map[string]interface{}
position *node.Position position *node.Position
Class node.Node Class node.Node
ConstantName node.Node ConstantName node.Node
@ -13,7 +12,6 @@ type ClassConstFetch struct {
func NewClassConstFetch(Class node.Node, ConstantName node.Node) node.Node { func NewClassConstFetch(Class node.Node, ConstantName node.Node) node.Node {
return &ClassConstFetch{ return &ClassConstFetch{
map[string]interface{}{},
nil, nil,
Class, Class,
ConstantName, ConstantName,
@ -21,7 +19,7 @@ func NewClassConstFetch(Class node.Node, ConstantName node.Node) node.Node {
} }
func (n ClassConstFetch) Attributes() map[string]interface{} { func (n ClassConstFetch) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n ClassConstFetch) Position() *node.Position { func (n ClassConstFetch) Position() *node.Position {

View File

@ -5,21 +5,19 @@ import (
) )
type Clone struct { type Clone struct {
attributes map[string]interface{} position *node.Position
position *node.Position Expr node.Node
expr node.Node
} }
func NewClone(Expression node.Node) node.Node { func NewClone(Expression node.Node) node.Node {
return &Clone{ return &Clone{
map[string]interface{}{},
nil, nil,
Expression, Expression,
} }
} }
func (n Clone) Attributes() map[string]interface{} { func (n Clone) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n Clone) Position() *node.Position { func (n Clone) Position() *node.Position {
@ -36,9 +34,9 @@ func (n Clone) Walk(v node.Visitor) {
return return
} }
if n.expr != nil { if n.Expr != nil {
vv := v.GetChildrenVisitor("expr") vv := v.GetChildrenVisitor("Expr")
n.expr.Walk(vv) n.Expr.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -5,22 +5,22 @@ import (
) )
type Closure struct { type Closure struct {
attributes map[string]interface{} position *node.Position
position *node.Position ReturnsRef bool
Params []node.Node Static bool
Uses []node.Node PhpDocComment string
ReturnType node.Node Params []node.Node
Stmts []node.Node Uses []node.Node
ReturnType node.Node
Stmts []node.Node
} }
func NewClosure(Params []node.Node, Uses []node.Node, ReturnType node.Node, Stmts []node.Node, isStatic bool, isReturnRef bool, phpDocComment string) node.Node { func NewClosure(Params []node.Node, Uses []node.Node, ReturnType node.Node, Stmts []node.Node, Static bool, ReturnsRef bool, PhpDocComment string) node.Node {
return &Closure{ return &Closure{
map[string]interface{}{
"isReturnRef": isReturnRef,
"isStatic": isStatic,
"phpDocComment": phpDocComment,
},
nil, nil,
ReturnsRef,
Static,
PhpDocComment,
Params, Params,
Uses, Uses,
ReturnType, ReturnType,
@ -29,7 +29,11 @@ func NewClosure(Params []node.Node, Uses []node.Node, ReturnType node.Node, Stmt
} }
func (n Closure) Attributes() map[string]interface{} { func (n Closure) Attributes() map[string]interface{} {
return n.attributes return map[string]interface{}{
"ReturnsRef": n.ReturnsRef,
"Static": n.Static,
"PhpDocComment": n.PhpDocComment,
}
} }
func (n Closure) Position() *node.Position { func (n Closure) Position() *node.Position {

View File

@ -5,23 +5,23 @@ import (
) )
type ClusureUse struct { type ClusureUse struct {
attributes map[string]interface{} position *node.Position
position *node.Position ByRef bool
Variable node.Node Variable node.Node
} }
func NewClusureUse(Variable node.Node, byRef bool) node.Node { func NewClusureUse(Variable node.Node, ByRef bool) node.Node {
return &ClusureUse{ return &ClusureUse{
map[string]interface{}{
"byRef": byRef,
},
nil, nil,
ByRef,
Variable, Variable,
} }
} }
func (n ClusureUse) Attributes() map[string]interface{} { func (n ClusureUse) Attributes() map[string]interface{} {
return n.attributes return map[string]interface{}{
"ByRef": n.ByRef,
}
} }
func (n ClusureUse) Position() *node.Position { func (n ClusureUse) Position() *node.Position {

View File

@ -5,21 +5,19 @@ import (
) )
type ConstFetch struct { type ConstFetch struct {
attributes map[string]interface{} position *node.Position
position *node.Position Constant node.Node
Constant node.Node
} }
func NewConstFetch(Constant node.Node) node.Node { func NewConstFetch(Constant node.Node) node.Node {
return &ConstFetch{ return &ConstFetch{
map[string]interface{}{},
nil, nil,
Constant, Constant,
} }
} }
func (n ConstFetch) Attributes() map[string]interface{} { func (n ConstFetch) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n ConstFetch) Position() *node.Position { func (n ConstFetch) Position() *node.Position {

View File

@ -5,21 +5,19 @@ import (
) )
type Empty struct { type Empty struct {
attributes map[string]interface{} position *node.Position
position *node.Position Expr node.Node
expr node.Node
} }
func NewEmpty(Expression node.Node) node.Node { func NewEmpty(Expression node.Node) node.Node {
return &Empty{ return &Empty{
map[string]interface{}{},
nil, nil,
Expression, Expression,
} }
} }
func (n Empty) Attributes() map[string]interface{} { func (n Empty) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n Empty) Position() *node.Position { func (n Empty) Position() *node.Position {
@ -36,9 +34,9 @@ func (n Empty) Walk(v node.Visitor) {
return return
} }
if n.expr != nil { if n.Expr != nil {
vv := v.GetChildrenVisitor("expr") vv := v.GetChildrenVisitor("Expr")
n.expr.Walk(vv) n.Expr.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -5,21 +5,19 @@ import (
) )
type ErrorSuppress struct { type ErrorSuppress struct {
attributes map[string]interface{} position *node.Position
position *node.Position Expr node.Node
expr node.Node
} }
func NewErrorSuppress(Expression node.Node) node.Node { func NewErrorSuppress(Expression node.Node) node.Node {
return &ErrorSuppress{ return &ErrorSuppress{
map[string]interface{}{},
nil, nil,
Expression, Expression,
} }
} }
func (n ErrorSuppress) Attributes() map[string]interface{} { func (n ErrorSuppress) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n ErrorSuppress) Position() *node.Position { func (n ErrorSuppress) Position() *node.Position {
@ -36,9 +34,9 @@ func (n ErrorSuppress) Walk(v node.Visitor) {
return return
} }
if n.expr != nil { if n.Expr != nil {
vv := v.GetChildrenVisitor("expr") vv := v.GetChildrenVisitor("Expr")
n.expr.Walk(vv) n.Expr.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -5,21 +5,19 @@ import (
) )
type Eval struct { type Eval struct {
attributes map[string]interface{} position *node.Position
position *node.Position Expr node.Node
expr node.Node
} }
func NewEval(Expression node.Node) node.Node { func NewEval(Expression node.Node) node.Node {
return &Eval{ return &Eval{
map[string]interface{}{},
nil, nil,
Expression, Expression,
} }
} }
func (n Eval) Attributes() map[string]interface{} { func (n Eval) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n Eval) Position() *node.Position { func (n Eval) Position() *node.Position {
@ -36,9 +34,9 @@ func (n Eval) Walk(v node.Visitor) {
return return
} }
if n.expr != nil { if n.Expr != nil {
vv := v.GetChildrenVisitor("expr") vv := v.GetChildrenVisitor("Expr")
n.expr.Walk(vv) n.Expr.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -5,23 +5,23 @@ import (
) )
type Exit struct { type Exit struct {
attributes map[string]interface{} position *node.Position
position *node.Position Expr node.Node
expr node.Node IsDie bool
} }
func NewExit(expr node.Node, isDie bool) node.Node { func NewExit(Expr node.Node, IsDie bool) node.Node {
return &Exit{ return &Exit{
map[string]interface{}{
"isDie": isDie,
},
nil, nil,
expr, Expr,
IsDie,
} }
} }
func (n Exit) Attributes() map[string]interface{} { func (n Exit) Attributes() map[string]interface{} {
return n.attributes return map[string]interface{}{
"IsDie": n.IsDie,
}
} }
func (n Exit) Position() *node.Position { func (n Exit) Position() *node.Position {
@ -38,9 +38,9 @@ func (n Exit) Walk(v node.Visitor) {
return return
} }
if n.expr != nil { if n.Expr != nil {
vv := v.GetChildrenVisitor("expr") vv := v.GetChildrenVisitor("Expr")
n.expr.Walk(vv) n.Expr.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -5,15 +5,13 @@ import (
) )
type FunctionCall struct { type FunctionCall struct {
attributes map[string]interface{} position *node.Position
position *node.Position Function node.Node
Function node.Node Arguments []node.Node
Arguments []node.Node
} }
func NewFunctionCall(Function node.Node, Arguments []node.Node) node.Node { func NewFunctionCall(Function node.Node, Arguments []node.Node) node.Node {
return &FunctionCall{ return &FunctionCall{
map[string]interface{}{},
nil, nil,
Function, Function,
Arguments, Arguments,
@ -21,7 +19,7 @@ func NewFunctionCall(Function node.Node, Arguments []node.Node) node.Node {
} }
func (n FunctionCall) Attributes() map[string]interface{} { func (n FunctionCall) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n FunctionCall) Position() *node.Position { func (n FunctionCall) Position() *node.Position {

View File

@ -5,21 +5,19 @@ import (
) )
type Include struct { type Include struct {
attributes map[string]interface{} position *node.Position
position *node.Position Expr node.Node
expr node.Node
} }
func NewInclude(Expression node.Node) node.Node { func NewInclude(Expression node.Node) node.Node {
return &Include{ return &Include{
map[string]interface{}{},
nil, nil,
Expression, Expression,
} }
} }
func (n Include) Attributes() map[string]interface{} { func (n Include) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n Include) Position() *node.Position { func (n Include) Position() *node.Position {
@ -36,9 +34,9 @@ func (n Include) Walk(v node.Visitor) {
return return
} }
if n.expr != nil { if n.Expr != nil {
vv := v.GetChildrenVisitor("expr") vv := v.GetChildrenVisitor("Expr")
n.expr.Walk(vv) n.Expr.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -5,21 +5,19 @@ import (
) )
type IncludeOnce struct { type IncludeOnce struct {
attributes map[string]interface{} position *node.Position
position *node.Position Expr node.Node
expr node.Node
} }
func NewIncludeOnce(Expression node.Node) node.Node { func NewIncludeOnce(Expression node.Node) node.Node {
return &IncludeOnce{ return &IncludeOnce{
map[string]interface{}{},
nil, nil,
Expression, Expression,
} }
} }
func (n IncludeOnce) Attributes() map[string]interface{} { func (n IncludeOnce) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n IncludeOnce) Position() *node.Position { func (n IncludeOnce) Position() *node.Position {
@ -36,9 +34,9 @@ func (n IncludeOnce) Walk(v node.Visitor) {
return return
} }
if n.expr != nil { if n.Expr != nil {
vv := v.GetChildrenVisitor("expr") vv := v.GetChildrenVisitor("Expr")
n.expr.Walk(vv) n.Expr.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -5,23 +5,21 @@ import (
) )
type InstanceOf struct { type InstanceOf struct {
attributes map[string]interface{} position *node.Position
position *node.Position Expr node.Node
expr node.Node Class node.Node
Class node.Node
} }
func NewInstanceOf(expr node.Node, Class node.Node) node.Node { func NewInstanceOf(Expr node.Node, Class node.Node) node.Node {
return &InstanceOf{ return &InstanceOf{
map[string]interface{}{},
nil, nil,
expr, Expr,
Class, Class,
} }
} }
func (n InstanceOf) Attributes() map[string]interface{} { func (n InstanceOf) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n InstanceOf) Position() *node.Position { func (n InstanceOf) Position() *node.Position {
@ -38,9 +36,9 @@ func (n InstanceOf) Walk(v node.Visitor) {
return return
} }
if n.expr != nil { if n.Expr != nil {
vv := v.GetChildrenVisitor("expr") vv := v.GetChildrenVisitor("Expr")
n.expr.Walk(vv) n.Expr.Walk(vv)
} }
if n.Class != nil { if n.Class != nil {

View File

@ -5,21 +5,19 @@ import (
) )
type Isset struct { type Isset struct {
attributes map[string]interface{} position *node.Position
position *node.Position Variables []node.Node
Variables []node.Node
} }
func NewIsset(Variables []node.Node) node.Node { func NewIsset(Variables []node.Node) node.Node {
return &Isset{ return &Isset{
map[string]interface{}{},
nil, nil,
Variables, Variables,
} }
} }
func (n Isset) Attributes() map[string]interface{} { func (n Isset) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n Isset) Position() *node.Position { func (n Isset) Position() *node.Position {

View File

@ -5,21 +5,19 @@ import (
) )
type List struct { type List struct {
attributes map[string]interface{} position *node.Position
position *node.Position Items []node.Node
Items []node.Node
} }
func NewList(Items []node.Node) node.Node { func NewList(Items []node.Node) node.Node {
return &List{ return &List{
map[string]interface{}{},
nil, nil,
Items, Items,
} }
} }
func (n List) Attributes() map[string]interface{} { func (n List) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n List) Position() *node.Position { func (n List) Position() *node.Position {

View File

@ -5,16 +5,14 @@ import (
) )
type MethodCall struct { type MethodCall struct {
attributes map[string]interface{} position *node.Position
position *node.Position Variable node.Node
Variable node.Node Method node.Node
Method node.Node Arguments []node.Node
Arguments []node.Node
} }
func NewMethodCall(Variable node.Node, Method node.Node, Arguments []node.Node) node.Node { func NewMethodCall(Variable node.Node, Method node.Node, Arguments []node.Node) node.Node {
return &MethodCall{ return &MethodCall{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Method, Method,
@ -23,7 +21,7 @@ func NewMethodCall(Variable node.Node, Method node.Node, Arguments []node.Node)
} }
func (n MethodCall) Attributes() map[string]interface{} { func (n MethodCall) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n MethodCall) Position() *node.Position { func (n MethodCall) Position() *node.Position {

View File

@ -5,15 +5,13 @@ import (
) )
type New struct { type New struct {
attributes map[string]interface{} position *node.Position
position *node.Position Class node.Node
Class node.Node Arguments []node.Node
Arguments []node.Node
} }
func NewNew(Class node.Node, Arguments []node.Node) node.Node { func NewNew(Class node.Node, Arguments []node.Node) node.Node {
return &New{ return &New{
map[string]interface{}{},
nil, nil,
Class, Class,
Arguments, Arguments,
@ -21,7 +19,7 @@ func NewNew(Class node.Node, Arguments []node.Node) node.Node {
} }
func (n New) Attributes() map[string]interface{} { func (n New) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n New) Position() *node.Position { func (n New) Position() *node.Position {

View File

@ -5,21 +5,19 @@ import (
) )
type PostDec struct { type PostDec struct {
attributes map[string]interface{} position *node.Position
position *node.Position Variable node.Node
Variable node.Node
} }
func NewPostDec(Variable node.Node) node.Node { func NewPostDec(Variable node.Node) node.Node {
return &PostDec{ return &PostDec{
map[string]interface{}{},
nil, nil,
Variable, Variable,
} }
} }
func (n PostDec) Attributes() map[string]interface{} { func (n PostDec) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n PostDec) Position() *node.Position { func (n PostDec) Position() *node.Position {

View File

@ -5,21 +5,19 @@ import (
) )
type PostInc struct { type PostInc struct {
attributes map[string]interface{} position *node.Position
position *node.Position Variable node.Node
Variable node.Node
} }
func NewPostInc(Variable node.Node) node.Node { func NewPostInc(Variable node.Node) node.Node {
return &PostInc{ return &PostInc{
map[string]interface{}{},
nil, nil,
Variable, Variable,
} }
} }
func (n PostInc) Attributes() map[string]interface{} { func (n PostInc) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n PostInc) Position() *node.Position { func (n PostInc) Position() *node.Position {

View File

@ -5,21 +5,19 @@ import (
) )
type PreDec struct { type PreDec struct {
attributes map[string]interface{} position *node.Position
position *node.Position Variable node.Node
Variable node.Node
} }
func NewPreDec(Variable node.Node) node.Node { func NewPreDec(Variable node.Node) node.Node {
return &PreDec{ return &PreDec{
map[string]interface{}{},
nil, nil,
Variable, Variable,
} }
} }
func (n PreDec) Attributes() map[string]interface{} { func (n PreDec) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n PreDec) Position() *node.Position { func (n PreDec) Position() *node.Position {

View File

@ -5,21 +5,19 @@ import (
) )
type PreInc struct { type PreInc struct {
attributes map[string]interface{} position *node.Position
position *node.Position Variable node.Node
Variable node.Node
} }
func NewPreInc(Variable node.Node) node.Node { func NewPreInc(Variable node.Node) node.Node {
return &PreInc{ return &PreInc{
map[string]interface{}{},
nil, nil,
Variable, Variable,
} }
} }
func (n PreInc) Attributes() map[string]interface{} { func (n PreInc) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n PreInc) Position() *node.Position { func (n PreInc) Position() *node.Position {

View File

@ -5,21 +5,19 @@ import (
) )
type Print struct { type Print struct {
attributes map[string]interface{} position *node.Position
position *node.Position Expr node.Node
expr node.Node
} }
func NewPrint(Expression node.Node) node.Node { func NewPrint(Expression node.Node) node.Node {
return &Print{ return &Print{
map[string]interface{}{},
nil, nil,
Expression, Expression,
} }
} }
func (n Print) Attributes() map[string]interface{} { func (n Print) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n Print) Position() *node.Position { func (n Print) Position() *node.Position {
@ -36,9 +34,9 @@ func (n Print) Walk(v node.Visitor) {
return return
} }
if n.expr != nil { if n.Expr != nil {
vv := v.GetChildrenVisitor("expr") vv := v.GetChildrenVisitor("Expr")
n.expr.Walk(vv) n.Expr.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -5,15 +5,13 @@ import (
) )
type PropertyFetch struct { type PropertyFetch struct {
attributes map[string]interface{} position *node.Position
position *node.Position Variable node.Node
Variable node.Node Property node.Node
Property node.Node
} }
func NewPropertyFetch(Variable node.Node, Property node.Node) node.Node { func NewPropertyFetch(Variable node.Node, Property node.Node) node.Node {
return &PropertyFetch{ return &PropertyFetch{
map[string]interface{}{},
nil, nil,
Variable, Variable,
Property, Property,
@ -21,7 +19,7 @@ func NewPropertyFetch(Variable node.Node, Property node.Node) node.Node {
} }
func (n PropertyFetch) Attributes() map[string]interface{} { func (n PropertyFetch) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n PropertyFetch) Position() *node.Position { func (n PropertyFetch) Position() *node.Position {

View File

@ -5,21 +5,19 @@ import (
) )
type Require struct { type Require struct {
attributes map[string]interface{} position *node.Position
position *node.Position Expr node.Node
expr node.Node
} }
func NewRequire(Expression node.Node) node.Node { func NewRequire(Expression node.Node) node.Node {
return &Require{ return &Require{
map[string]interface{}{},
nil, nil,
Expression, Expression,
} }
} }
func (n Require) Attributes() map[string]interface{} { func (n Require) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n Require) Position() *node.Position { func (n Require) Position() *node.Position {
@ -36,9 +34,9 @@ func (n Require) Walk(v node.Visitor) {
return return
} }
if n.expr != nil { if n.Expr != nil {
vv := v.GetChildrenVisitor("expr") vv := v.GetChildrenVisitor("Expr")
n.expr.Walk(vv) n.Expr.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -5,21 +5,19 @@ import (
) )
type RequireOnce struct { type RequireOnce struct {
attributes map[string]interface{} position *node.Position
position *node.Position Expr node.Node
expr node.Node
} }
func NewRequireOnce(Expression node.Node) node.Node { func NewRequireOnce(Expression node.Node) node.Node {
return &RequireOnce{ return &RequireOnce{
map[string]interface{}{},
nil, nil,
Expression, Expression,
} }
} }
func (n RequireOnce) Attributes() map[string]interface{} { func (n RequireOnce) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n RequireOnce) Position() *node.Position { func (n RequireOnce) Position() *node.Position {
@ -36,9 +34,9 @@ func (n RequireOnce) Walk(v node.Visitor) {
return return
} }
if n.expr != nil { if n.Expr != nil {
vv := v.GetChildrenVisitor("expr") vv := v.GetChildrenVisitor("Expr")
n.expr.Walk(vv) n.Expr.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -5,21 +5,19 @@ import (
) )
type ShellExec struct { type ShellExec struct {
attributes map[string]interface{} position *node.Position
position *node.Position Parts []node.Node
Parts []node.Node
} }
func NewShellExec(Parts []node.Node) node.Node { func NewShellExec(Parts []node.Node) node.Node {
return &ShellExec{ return &ShellExec{
map[string]interface{}{},
nil, nil,
Parts, Parts,
} }
} }
func (n ShellExec) Attributes() map[string]interface{} { func (n ShellExec) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n ShellExec) Position() *node.Position { func (n ShellExec) Position() *node.Position {

View File

@ -5,21 +5,19 @@ import (
) )
type ShortArray struct { type ShortArray struct {
attributes map[string]interface{} position *node.Position
position *node.Position Items []node.Node
Items []node.Node
} }
func NewShortArray(Items []node.Node) node.Node { func NewShortArray(Items []node.Node) node.Node {
return &ShortArray{ return &ShortArray{
map[string]interface{}{},
nil, nil,
Items, Items,
} }
} }
func (n ShortArray) Attributes() map[string]interface{} { func (n ShortArray) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n ShortArray) Position() *node.Position { func (n ShortArray) Position() *node.Position {

View File

@ -5,21 +5,19 @@ import (
) )
type ShortList struct { type ShortList struct {
attributes map[string]interface{} position *node.Position
position *node.Position Items []node.Node
Items []node.Node
} }
func NewShortList(Items []node.Node) node.Node { func NewShortList(Items []node.Node) node.Node {
return &ShortList{ return &ShortList{
map[string]interface{}{},
nil, nil,
Items, Items,
} }
} }
func (n ShortList) Attributes() map[string]interface{} { func (n ShortList) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n ShortList) Position() *node.Position { func (n ShortList) Position() *node.Position {

View File

@ -5,16 +5,14 @@ import (
) )
type StaticCall struct { type StaticCall struct {
attributes map[string]interface{} position *node.Position
position *node.Position Class node.Node
Class node.Node Call node.Node
Call node.Node Arguments []node.Node
Arguments []node.Node
} }
func NewStaticCall(Class node.Node, Call node.Node, Arguments []node.Node) node.Node { func NewStaticCall(Class node.Node, Call node.Node, Arguments []node.Node) node.Node {
return &StaticCall{ return &StaticCall{
map[string]interface{}{},
nil, nil,
Class, Class,
Call, Call,
@ -23,7 +21,7 @@ func NewStaticCall(Class node.Node, Call node.Node, Arguments []node.Node) node.
} }
func (n StaticCall) Attributes() map[string]interface{} { func (n StaticCall) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n StaticCall) Position() *node.Position { func (n StaticCall) Position() *node.Position {

View File

@ -5,15 +5,13 @@ import (
) )
type StaticPropertyFetch struct { type StaticPropertyFetch struct {
attributes map[string]interface{} position *node.Position
position *node.Position Class node.Node
Class node.Node Property node.Node
Property node.Node
} }
func NewStaticPropertyFetch(Class node.Node, Property node.Node) node.Node { func NewStaticPropertyFetch(Class node.Node, Property node.Node) node.Node {
return &StaticPropertyFetch{ return &StaticPropertyFetch{
map[string]interface{}{},
nil, nil,
Class, Class,
Property, Property,
@ -21,7 +19,7 @@ func NewStaticPropertyFetch(Class node.Node, Property node.Node) node.Node {
} }
func (n StaticPropertyFetch) Attributes() map[string]interface{} { func (n StaticPropertyFetch) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n StaticPropertyFetch) Position() *node.Position { func (n StaticPropertyFetch) Position() *node.Position {

View File

@ -5,16 +5,14 @@ import (
) )
type Ternary struct { type Ternary struct {
attributes map[string]interface{} position *node.Position
position *node.Position Condition node.Node
Condition node.Node IfTrue node.Node
IfTrue node.Node IfFalse node.Node
IfFalse node.Node
} }
func NewTernary(Condition node.Node, IfTrue node.Node, IfFalse node.Node) node.Node { func NewTernary(Condition node.Node, IfTrue node.Node, IfFalse node.Node) node.Node {
return &Ternary{ return &Ternary{
map[string]interface{}{},
nil, nil,
Condition, Condition,
IfTrue, IfTrue,
@ -23,7 +21,7 @@ func NewTernary(Condition node.Node, IfTrue node.Node, IfFalse node.Node) node.N
} }
func (n Ternary) Attributes() map[string]interface{} { func (n Ternary) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n Ternary) Position() *node.Position { func (n Ternary) Position() *node.Position {

View File

@ -5,21 +5,19 @@ import (
) )
type UnaryMinus struct { type UnaryMinus struct {
attributes map[string]interface{} position *node.Position
position *node.Position Expr node.Node
expr node.Node
} }
func NewUnaryMinus(Expression node.Node) node.Node { func NewUnaryMinus(Expression node.Node) node.Node {
return &UnaryMinus{ return &UnaryMinus{
map[string]interface{}{},
nil, nil,
Expression, Expression,
} }
} }
func (n UnaryMinus) Attributes() map[string]interface{} { func (n UnaryMinus) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n UnaryMinus) Position() *node.Position { func (n UnaryMinus) Position() *node.Position {
@ -36,9 +34,9 @@ func (n UnaryMinus) Walk(v node.Visitor) {
return return
} }
if n.expr != nil { if n.Expr != nil {
vv := v.GetChildrenVisitor("expr") vv := v.GetChildrenVisitor("Expr")
n.expr.Walk(vv) n.Expr.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -5,21 +5,19 @@ import (
) )
type UnaryPlus struct { type UnaryPlus struct {
attributes map[string]interface{} position *node.Position
position *node.Position Expr node.Node
expr node.Node
} }
func NewUnaryPlus(Expression node.Node) node.Node { func NewUnaryPlus(Expression node.Node) node.Node {
return &UnaryPlus{ return &UnaryPlus{
map[string]interface{}{},
nil, nil,
Expression, Expression,
} }
} }
func (n UnaryPlus) Attributes() map[string]interface{} { func (n UnaryPlus) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n UnaryPlus) Position() *node.Position { func (n UnaryPlus) Position() *node.Position {
@ -36,9 +34,9 @@ func (n UnaryPlus) Walk(v node.Visitor) {
return return
} }
if n.expr != nil { if n.Expr != nil {
vv := v.GetChildrenVisitor("expr") vv := v.GetChildrenVisitor("Expr")
n.expr.Walk(vv) n.Expr.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -5,21 +5,19 @@ import (
) )
type Variable struct { type Variable struct {
attributes map[string]interface{} position *node.Position
position *node.Position VarName node.Node
VarName node.Node
} }
func NewVariable(VarName node.Node) node.Node { func NewVariable(VarName node.Node) node.Node {
return &Variable{ return &Variable{
map[string]interface{}{},
nil, nil,
VarName, VarName,
} }
} }
func (n Variable) Attributes() map[string]interface{} { func (n Variable) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n Variable) Position() *node.Position { func (n Variable) Position() *node.Position {

View File

@ -5,15 +5,13 @@ import (
) )
type Yield struct { type Yield struct {
attributes map[string]interface{} position *node.Position
position *node.Position Key node.Node
Key node.Node Value node.Node
Value node.Node
} }
func NewYield(Key node.Node, Value node.Node) node.Node { func NewYield(Key node.Node, Value node.Node) node.Node {
return &Yield{ return &Yield{
map[string]interface{}{},
nil, nil,
Key, Key,
Value, Value,
@ -21,7 +19,7 @@ func NewYield(Key node.Node, Value node.Node) node.Node {
} }
func (n Yield) Attributes() map[string]interface{} { func (n Yield) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n Yield) Position() *node.Position { func (n Yield) Position() *node.Position {

View File

@ -5,21 +5,19 @@ import (
) )
type YieldFrom struct { type YieldFrom struct {
attributes map[string]interface{} position *node.Position
position *node.Position Expr node.Node
expr node.Node
} }
func NewYieldFrom(Expression node.Node) node.Node { func NewYieldFrom(Expression node.Node) node.Node {
return &YieldFrom{ return &YieldFrom{
map[string]interface{}{},
nil, nil,
Expression, Expression,
} }
} }
func (n YieldFrom) Attributes() map[string]interface{} { func (n YieldFrom) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n YieldFrom) Position() *node.Position { func (n YieldFrom) Position() *node.Position {
@ -36,9 +34,9 @@ func (n YieldFrom) Walk(v node.Visitor) {
return return
} }
if n.expr != nil { if n.Expr != nil {
vv := v.GetChildrenVisitor("expr") vv := v.GetChildrenVisitor("Expr")
n.expr.Walk(vv) n.Expr.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -1,34 +1,21 @@
package node package node
import (
"github.com/z7zmey/php-parser/token"
)
type Identifier struct { type Identifier struct {
attributes map[string]interface{} position *Position
position *Position Value string
} }
func NewIdentifier(token token.Token) Node { func NewIdentifier(Value string) Node {
return &Identifier{ return &Identifier{
map[string]interface{}{
"Value": token.Value,
},
nil, nil,
Value,
} }
} }
func (n Identifier) Attributes() map[string]interface{} { func (n Identifier) Attributes() map[string]interface{} {
return n.attributes return map[string]interface{}{
} "Value": n.Value,
}
func (n Identifier) Attribute(Key string) interface{} {
return n.attributes[Key]
}
func (n Identifier) SetAttribute(Key string, Value interface{}) Node {
n.attributes[Key] = Value
return n
} }
func (n Identifier) Position() *Position { func (n Identifier) Position() *Position {

View File

@ -11,13 +11,8 @@ type FullyQualified struct {
func NewFullyQualified(Parts []node.Node) node.Node { func NewFullyQualified(Parts []node.Node) node.Node {
return &FullyQualified{ return &FullyQualified{
Name{ Name{
map[string]interface{}{},
nil, nil,
Parts, Parts,
}, },
} }
} }
func (n FullyQualified) Attributes() map[string]interface{} {
return n.attributes
}

View File

@ -5,21 +5,19 @@ import (
) )
type Name struct { type Name struct {
attributes map[string]interface{} position *node.Position
position *node.Position Parts []node.Node
Parts []node.Node
} }
func NewName(Parts []node.Node) node.Node { func NewName(Parts []node.Node) node.Node {
return &Name{ return &Name{
map[string]interface{}{},
nil, nil,
Parts, Parts,
} }
} }
func (n Name) Attributes() map[string]interface{} { func (n Name) Attributes() map[string]interface{} {
return n.attributes return nil
} }
func (n Name) Position() *node.Position { func (n Name) Position() *node.Position {

View File

@ -5,21 +5,21 @@ import (
) )
type NamePart struct { type NamePart struct {
attributes map[string]interface{} position *node.Position
position *node.Position Value string
} }
func NewNamePart(Value string) node.Node { func NewNamePart(Value string) node.Node {
return &NamePart{ return &NamePart{
map[string]interface{}{
"Value": Value,
},
nil, nil,
Value,
} }
} }
func (n NamePart) Attributes() map[string]interface{} { func (n NamePart) Attributes() map[string]interface{} {
return n.attributes return map[string]interface{}{
"Value": n.Value,
}
} }
func (n NamePart) Position() *node.Position { func (n NamePart) Position() *node.Position {

View File

@ -11,13 +11,8 @@ type Relative struct {
func NewRelative(Parts []node.Node) node.Node { func NewRelative(Parts []node.Node) node.Node {
return &Relative{ return &Relative{
Name{ Name{
map[string]interface{}{},
nil, nil,
Parts, Parts,
}, },
} }
} }
func (n Relative) Attributes() map[string]interface{} {
return n.attributes
}

View File

@ -1,30 +1,19 @@
package node package node
type Nullable struct { type Nullable struct {
attributes map[string]interface{} position *Position
position *Position Expr Node
expr Node
} }
func NewNullable(Expression Node) Node { func NewNullable(Expression Node) Node {
return &Nullable{ return &Nullable{
map[string]interface{}{},
nil, nil,
Expression, Expression,
} }
} }
func (n Nullable) Attributes() map[string]interface{} { func (n Nullable) Attributes() map[string]interface{} {
return n.attributes return nil
}
func (n Nullable) Attribute(Key string) interface{} {
return n.attributes[Key]
}
func (n Nullable) SetAttribute(Key string, Value interface{}) Node {
n.attributes[Key] = Value
return n
} }
func (n Nullable) Position() *Position { func (n Nullable) Position() *Position {
@ -41,9 +30,9 @@ func (n Nullable) Walk(v Visitor) {
return return
} }
if n.expr != nil { if n.Expr != nil {
vv := v.GetChildrenVisitor("expr") vv := v.GetChildrenVisitor("Expr")
n.expr.Walk(vv) n.Expr.Walk(vv)
} }
v.LeaveNode(n) v.LeaveNode(n)

View File

@ -1,20 +1,19 @@
package node package node
type Parameter struct { type Parameter struct {
attributes map[string]interface{}
position *Position position *Position
ByRef bool
Variadic bool
VariableType Node VariableType Node
Variable Node Variable Node
DefaultValue Node DefaultValue Node
} }
func NewParameter(VariableType Node, Variable Node, DefaultValue Node, byRef bool, variadic bool) Node { func NewParameter(VariableType Node, Variable Node, DefaultValue Node, ByRef bool, Variadic bool) Node {
return &Parameter{ return &Parameter{
map[string]interface{}{
"byRef": byRef,
"variadic": variadic,
},
nil, nil,
ByRef,
Variadic,
VariableType, VariableType,
Variable, Variable,
DefaultValue, DefaultValue,
@ -22,16 +21,10 @@ func NewParameter(VariableType Node, Variable Node, DefaultValue Node, byRef boo
} }
func (n Parameter) Attributes() map[string]interface{} { func (n Parameter) Attributes() map[string]interface{} {
return n.attributes return map[string]interface{}{
} "ByRef": n.ByRef,
"Variadic": n.Variadic,
func (n Parameter) Attribute(Key string) interface{} { }
return n.attributes[Key]
}
func (n Parameter) SetAttribute(Key string, Value interface{}) Node {
n.attributes[Key] = Value
return n
} }
func (n Parameter) Position() *Position { func (n Parameter) Position() *Position {

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