remove name field

This commit is contained in:
z7zmey 2018-01-04 20:29:07 +02:00
parent e8655c5f4c
commit 383a245370
159 changed files with 14 additions and 891 deletions

View File

@ -2,6 +2,7 @@ package main
import ( import (
"fmt" "fmt"
"reflect"
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
@ -12,7 +13,7 @@ type dumper struct {
func (d dumper) EnterNode(n node.Node) bool { func (d dumper) EnterNode(n node.Node) bool {
fmt.Printf("%v%v", d.indent, n.Name()) fmt.Printf("%v%v", d.indent, reflect.TypeOf(n))
if p := n.Position(); p != nil { if p := n.Position(); p != nil {
fmt.Printf(" %v", *p) fmt.Printf(" %v", *p)
} }

View File

@ -1,7 +1,6 @@
package node package node
type Argument struct { type Argument struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *Position position *Position
expr Node expr Node
@ -10,7 +9,6 @@ type Argument struct {
func NewArgument(expression Node, variadic bool) Node { func NewArgument(expression Node, variadic bool) Node {
return Argument{ return Argument{
"Argument",
map[string]interface{}{ map[string]interface{}{
"variadic": variadic, "variadic": variadic,
}, },
@ -20,10 +18,6 @@ func NewArgument(expression Node, variadic bool) Node {
} }
} }
func (n Argument) Name() string {
return "Argument"
}
func (n Argument) Attributes() map[string]interface{} { func (n Argument) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type Array struct { type Array struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
items []node.Node items []node.Node
@ -13,17 +12,12 @@ type Array struct {
func NewArray(items []node.Node) node.Node { func NewArray(items []node.Node) node.Node {
return Array{ return Array{
"Array",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
items, items,
} }
} }
func (n Array) Name() string {
return "Array"
}
func (n Array) Attributes() map[string]interface{} { func (n Array) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type ArrayDimFetch struct { type ArrayDimFetch struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
variable node.Node variable node.Node
@ -14,7 +13,6 @@ type ArrayDimFetch struct {
func NewArrayDimFetch(variable node.Node, dim node.Node) node.Node { func NewArrayDimFetch(variable node.Node, dim node.Node) node.Node {
return ArrayDimFetch{ return ArrayDimFetch{
"ArrayDimFetch",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -22,10 +20,6 @@ func NewArrayDimFetch(variable node.Node, dim node.Node) node.Node {
} }
} }
func (n ArrayDimFetch) Name() string {
return "ArrayDimFetch"
}
func (n ArrayDimFetch) Attributes() map[string]interface{} { func (n ArrayDimFetch) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type ArrayItem struct { type ArrayItem struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
key node.Node key node.Node
@ -14,7 +13,6 @@ type ArrayItem struct {
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{
"ArrayItem",
map[string]interface{}{ map[string]interface{}{
"byRef": byRef, "byRef": byRef,
}, },
@ -24,10 +22,6 @@ func NewArrayItem(key node.Node, val node.Node, byRef bool) node.Node {
} }
} }
func (n ArrayItem) Name() string {
return "ArrayItem"
}
func (n ArrayItem) Attributes() map[string]interface{} { func (n ArrayItem) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"Assign",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewAssign(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n Assign) Name() string {
return "Assign"
}
func (n Assign) Attributes() map[string]interface{} { func (n Assign) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type AssignOp struct { type AssignOp struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
variable node.Node variable 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{
"AssignRef",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewAssignRef(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n AssignRef) Name() string {
return "AssignRef"
}
func (n AssignRef) Attributes() map[string]interface{} { func (n AssignRef) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"AssignBitwiseAnd",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewBitwiseAnd(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n BitwiseAnd) Name() string {
return "BitwiseAnd"
}
func (n BitwiseAnd) Attributes() map[string]interface{} { func (n BitwiseAnd) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"AssignBitwiseOr",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewBitwiseOr(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n BitwiseOr) Name() string {
return "BitwiseOr"
}
func (n BitwiseOr) Attributes() map[string]interface{} { func (n BitwiseOr) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"AssignBitwiseXor",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -42,10 +41,6 @@ func (n BitwiseXor) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n BitwiseXor) Name() string {
return "BitwiseXor"
}
func (n BitwiseXor) Walk(v node.Visitor) { func (n BitwiseXor) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -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{
"AssignConcat",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewConcat(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n Concat) Name() string {
return "Concat"
}
func (n Concat) Attributes() map[string]interface{} { func (n Concat) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"AssignDiv",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewDiv(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n Div) Name() string {
return "Div"
}
func (n Div) Attributes() map[string]interface{} { func (n Div) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"AssignMinus",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewMinus(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n Minus) Name() string {
return "Minus"
}
func (n Minus) Attributes() map[string]interface{} { func (n Minus) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"AssignMod",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewMod(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n Mod) Name() string {
return "Mod"
}
func (n Mod) Attributes() map[string]interface{} { func (n Mod) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"AssignMul",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewMul(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n Mul) Name() string {
return "Mul"
}
func (n Mul) Attributes() map[string]interface{} { func (n Mul) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"AssignPlus",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewPlus(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n Plus) Name() string {
return "Plus"
}
func (n Plus) Attributes() map[string]interface{} { func (n Plus) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"AssignPow",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewPow(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n Pow) Name() string {
return "Pow"
}
func (n Pow) Attributes() map[string]interface{} { func (n Pow) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"AssignShiftLeft",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewShiftLeft(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n ShiftLeft) Name() string {
return "ShiftLeft"
}
func (n ShiftLeft) Attributes() map[string]interface{} { func (n ShiftLeft) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"AssignShiftRight",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewShiftRight(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n ShiftRight) Name() string {
return "ShiftRight"
}
func (n ShiftRight) Attributes() map[string]interface{} { func (n ShiftRight) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type BinaryOp struct { type BinaryOp struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
left node.Node left 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{
"BinaryBitwiseAnd",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewBitwiseAnd(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n BitwiseAnd) Name() string {
return "BitwiseAnd"
}
func (n BitwiseAnd) Attributes() map[string]interface{} { func (n BitwiseAnd) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"BinaryBitwiseOr",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -42,10 +41,6 @@ func (n BitwiseOr) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n BitwiseOr) Name() string {
return "BitwiseOr"
}
func (n BitwiseOr) Walk(v node.Visitor) { func (n BitwiseOr) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -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{
"BinaryBitwiseXor",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -42,10 +41,6 @@ func (n BitwiseXor) SetPosition(p *node.Position) node.Node {
return n return n
} }
func (n BitwiseXor) Name() string {
return "BitwiseXor"
}
func (n BitwiseXor) Walk(v node.Visitor) { func (n BitwiseXor) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return

View File

@ -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{
"BinaryBooleanAnd",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewBooleanAnd(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n BooleanAnd) Name() string {
return "BooleanAnd"
}
func (n BooleanAnd) Attributes() map[string]interface{} { func (n BooleanAnd) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"BinaryBooleanOr",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewBooleanOr(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n BooleanOr) Name() string {
return "BooleanOr"
}
func (n BooleanOr) Attributes() map[string]interface{} { func (n BooleanOr) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"BinaryCoalesce",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewCoalesce(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n Coalesce) Name() string {
return "Coalesce"
}
func (n Coalesce) Attributes() map[string]interface{} { func (n Coalesce) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"BinaryConcat",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewConcat(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n Concat) Name() string {
return "Concat"
}
func (n Concat) Attributes() map[string]interface{} { func (n Concat) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"BinaryDiv",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewDiv(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n Div) Name() string {
return "Div"
}
func (n Div) Attributes() map[string]interface{} { func (n Div) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"BinaryEqual",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewEqual(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n Equal) Name() string {
return "Equal"
}
func (n Equal) Attributes() map[string]interface{} { func (n Equal) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"BinaryGreater",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewGreater(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n Greater) Name() string {
return "Greater"
}
func (n Greater) Attributes() map[string]interface{} { func (n Greater) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"BinaryGreaterOrEqual",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewGreaterOrEqual(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n GreaterOrEqual) Name() string {
return "GreaterOrEqual"
}
func (n GreaterOrEqual) Attributes() map[string]interface{} { func (n GreaterOrEqual) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"BinaryIdentical",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewIdentical(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n Identical) Name() string {
return "Identical"
}
func (n Identical) Attributes() map[string]interface{} { func (n Identical) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"BinaryLogicalAnd",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewLogicalAnd(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n LogicalAnd) Name() string {
return "LogicalAnd"
}
func (n LogicalAnd) Attributes() map[string]interface{} { func (n LogicalAnd) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"BinaryLogicalOr",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewLogicalOr(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n LogicalOr) Name() string {
return "LogicalOr"
}
func (n LogicalOr) Attributes() map[string]interface{} { func (n LogicalOr) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"BinaryLogicalXor",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewLogicalXor(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n LogicalXor) Name() string {
return "LogicalXor"
}
func (n LogicalXor) Attributes() map[string]interface{} { func (n LogicalXor) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"BinaryMinus",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewMinus(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n Minus) Name() string {
return "Minus"
}
func (n Minus) Attributes() map[string]interface{} { func (n Minus) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"BinaryMod",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewMod(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n Mod) Name() string {
return "Mod"
}
func (n Mod) Attributes() map[string]interface{} { func (n Mod) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"BinaryMul",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewMul(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n Mul) Name() string {
return "Mul"
}
func (n Mul) Attributes() map[string]interface{} { func (n Mul) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"BinaryNotEqual",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewNotEqual(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n NotEqual) Name() string {
return "NotEqual"
}
func (n NotEqual) Attributes() map[string]interface{} { func (n NotEqual) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"BinaryNotIdentical",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewNotIdentical(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n NotIdentical) Name() string {
return "NotIdentical"
}
func (n NotIdentical) Attributes() map[string]interface{} { func (n NotIdentical) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"BinaryPlus",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewPlus(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n Plus) Name() string {
return "Plus"
}
func (n Plus) Attributes() map[string]interface{} { func (n Plus) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"BinaryPow",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewPow(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n Pow) Name() string {
return "Pow"
}
func (n Pow) Attributes() map[string]interface{} { func (n Pow) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"BinaryShiftLeft",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewShiftLeft(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n ShiftLeft) Name() string {
return "ShiftLeft"
}
func (n ShiftLeft) Attributes() map[string]interface{} { func (n ShiftLeft) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"BinaryShiftRight",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewShiftRight(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n ShiftRight) Name() string {
return "ShiftRight"
}
func (n ShiftRight) Attributes() map[string]interface{} { func (n ShiftRight) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"BinarySmaller",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewSmaller(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n Smaller) Name() string {
return "Smaller"
}
func (n Smaller) Attributes() map[string]interface{} { func (n Smaller) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"BinarySmallerOrEqual",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewSmallerOrEqual(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n SmallerOrEqual) Name() string {
return "SmallerOrEqual"
}
func (n SmallerOrEqual) Attributes() map[string]interface{} { func (n SmallerOrEqual) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

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{
"BinarySpaceship",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -20,10 +19,6 @@ func NewSpaceship(variable node.Node, expression node.Node) node.Node {
} }
} }
func (n Spaceship) Name() string {
return "Spaceship"
}
func (n Spaceship) Attributes() map[string]interface{} { func (n Spaceship) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type BitwiseNot struct { type BitwiseNot struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
expr node.Node expr node.Node
@ -13,17 +12,12 @@ type BitwiseNot struct {
func NewBitwiseNot(expression node.Node) node.Node { func NewBitwiseNot(expression node.Node) node.Node {
return BitwiseNot{ return BitwiseNot{
"BitwiseNot",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expression, expression,
} }
} }
func (n BitwiseNot) Name() string {
return "BitwiseNot"
}
func (n BitwiseNot) Attributes() map[string]interface{} { func (n BitwiseNot) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type BooleanNot struct { type BooleanNot struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
expr node.Node expr node.Node
@ -13,17 +12,12 @@ type BooleanNot struct {
func NewBooleanNot(expression node.Node) node.Node { func NewBooleanNot(expression node.Node) node.Node {
return BooleanNot{ return BooleanNot{
"BooleanNot",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expression, expression,
} }
} }
func (n BooleanNot) Name() string {
return "BooleanNot"
}
func (n BooleanNot) Attributes() map[string]interface{} { func (n BooleanNot) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

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

View File

@ -11,7 +11,6 @@ type CastArray struct {
func NewCastArray(expr node.Node) node.Node { func NewCastArray(expr node.Node) node.Node {
return CastArray{ return CastArray{
Cast{ Cast{
"CastArray",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expr, expr,
@ -19,10 +18,6 @@ func NewCastArray(expr node.Node) node.Node {
} }
} }
func (n CastArray) Name() string {
return "CastArray"
}
func (n CastArray) Attributes() map[string]interface{} { func (n CastArray) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -11,7 +11,6 @@ type CastBool struct {
func NewCastBool(expr node.Node) node.Node { func NewCastBool(expr node.Node) node.Node {
return CastBool{ return CastBool{
Cast{ Cast{
"CastBool",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expr, expr,
@ -19,10 +18,6 @@ func NewCastBool(expr node.Node) node.Node {
} }
} }
func (n CastBool) Name() string {
return "CastBool"
}
func (n CastBool) Attributes() map[string]interface{} { func (n CastBool) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -11,7 +11,6 @@ type CastDouble struct {
func NewCastDouble(expr node.Node) node.Node { func NewCastDouble(expr node.Node) node.Node {
return CastDouble{ return CastDouble{
Cast{ Cast{
"CastDouble",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expr, expr,
@ -19,10 +18,6 @@ func NewCastDouble(expr node.Node) node.Node {
} }
} }
func (n CastDouble) Name() string {
return "CastDouble"
}
func (n CastDouble) Attributes() map[string]interface{} { func (n CastDouble) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -11,7 +11,6 @@ type CastInt struct {
func NewCastInt(expr node.Node) node.Node { func NewCastInt(expr node.Node) node.Node {
return CastInt{ return CastInt{
Cast{ Cast{
"CastInt",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expr, expr,
@ -19,10 +18,6 @@ func NewCastInt(expr node.Node) node.Node {
} }
} }
func (n CastInt) Name() string {
return "CastInt"
}
func (n CastInt) Attributes() map[string]interface{} { func (n CastInt) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -11,7 +11,6 @@ type CastObject struct {
func NewCastObject(expr node.Node) node.Node { func NewCastObject(expr node.Node) node.Node {
return CastObject{ return CastObject{
Cast{ Cast{
"CastObject",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expr, expr,
@ -19,10 +18,6 @@ func NewCastObject(expr node.Node) node.Node {
} }
} }
func (n CastObject) Name() string {
return "CastObject"
}
func (n CastObject) Attributes() map[string]interface{} { func (n CastObject) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -11,7 +11,6 @@ type CastString struct {
func NewCastString(expr node.Node) node.Node { func NewCastString(expr node.Node) node.Node {
return CastString{ return CastString{
Cast{ Cast{
"CastString",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expr, expr,
@ -19,10 +18,6 @@ func NewCastString(expr node.Node) node.Node {
} }
} }
func (n CastString) Name() string {
return "CastString"
}
func (n CastString) Attributes() map[string]interface{} { func (n CastString) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -11,7 +11,6 @@ type CastUnset struct {
func NewCastUnset(expr node.Node) node.Node { func NewCastUnset(expr node.Node) node.Node {
return CastUnset{ return CastUnset{
Cast{ Cast{
"CastUnset",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expr, expr,
@ -19,10 +18,6 @@ func NewCastUnset(expr node.Node) node.Node {
} }
} }
func (n CastUnset) Name() string {
return "CastUnset"
}
func (n CastUnset) Attributes() map[string]interface{} { func (n CastUnset) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type ClassConstFetch struct { type ClassConstFetch struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
class node.Node class node.Node
@ -14,7 +13,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{
"ClassConstFetch",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
class, class,
@ -22,10 +20,6 @@ func NewClassConstFetch(class node.Node, constantName node.Node) node.Node {
} }
} }
func (n ClassConstFetch) Name() string {
return "ClassConstFetch"
}
func (n ClassConstFetch) Attributes() map[string]interface{} { func (n ClassConstFetch) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type Clone struct { type Clone struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
expr node.Node expr node.Node
@ -13,17 +12,12 @@ type Clone struct {
func NewClone(expression node.Node) node.Node { func NewClone(expression node.Node) node.Node {
return Clone{ return Clone{
"Clone",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expression, expression,
} }
} }
func (n Clone) Name() string {
return "Clone"
}
func (n Clone) Attributes() map[string]interface{} { func (n Clone) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type Closure struct { type Closure struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
params []node.Node params []node.Node
@ -16,7 +15,6 @@ type Closure struct {
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, isStatic bool, isReturnRef bool, phpDocComment string) node.Node {
return Closure{ return Closure{
"Closure",
map[string]interface{}{ map[string]interface{}{
"isReturnRef": isReturnRef, "isReturnRef": isReturnRef,
"isStatic": isStatic, "isStatic": isStatic,
@ -30,10 +28,6 @@ func NewClosure(params []node.Node, uses []node.Node, returnType node.Node, stmt
} }
} }
func (n Closure) Name() string {
return "Closure"
}
func (n Closure) Attributes() map[string]interface{} { func (n Closure) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type ClusureUse struct { type ClusureUse struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
variable node.Node variable node.Node
@ -13,7 +12,6 @@ type ClusureUse struct {
func NewClusureUse(variable node.Node, byRef bool) node.Node { func NewClusureUse(variable node.Node, byRef bool) node.Node {
return ClusureUse{ return ClusureUse{
"ClusureUse",
map[string]interface{}{ map[string]interface{}{
"byRef": byRef, "byRef": byRef,
}, },
@ -22,10 +20,6 @@ func NewClusureUse(variable node.Node, byRef bool) node.Node {
} }
} }
func (n ClusureUse) Name() string {
return "ClusureUse"
}
func (n ClusureUse) Attributes() map[string]interface{} { func (n ClusureUse) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type ConstFetch struct { type ConstFetch struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
constant node.Node constant node.Node
@ -13,17 +12,12 @@ type ConstFetch struct {
func NewConstFetch(constant node.Node) node.Node { func NewConstFetch(constant node.Node) node.Node {
return ConstFetch{ return ConstFetch{
"ConstFetch",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
constant, constant,
} }
} }
func (n ConstFetch) Name() string {
return "ConstFetch"
}
func (n ConstFetch) Attributes() map[string]interface{} { func (n ConstFetch) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type Empty struct { type Empty struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
expr node.Node expr node.Node
@ -13,17 +12,12 @@ type Empty struct {
func NewEmpty(expression node.Node) node.Node { func NewEmpty(expression node.Node) node.Node {
return Empty{ return Empty{
"Empty",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expression, expression,
} }
} }
func (n Empty) Name() string {
return "Empty"
}
func (n Empty) Attributes() map[string]interface{} { func (n Empty) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type ErrorSuppress struct { type ErrorSuppress struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
expr node.Node expr node.Node
@ -13,17 +12,12 @@ type ErrorSuppress struct {
func NewErrorSuppress(expression node.Node) node.Node { func NewErrorSuppress(expression node.Node) node.Node {
return ErrorSuppress{ return ErrorSuppress{
"ErrorSuppress",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expression, expression,
} }
} }
func (n ErrorSuppress) Name() string {
return "ErrorSuppress"
}
func (n ErrorSuppress) Attributes() map[string]interface{} { func (n ErrorSuppress) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type Eval struct { type Eval struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
expr node.Node expr node.Node
@ -13,17 +12,12 @@ type Eval struct {
func NewEval(expression node.Node) node.Node { func NewEval(expression node.Node) node.Node {
return Eval{ return Eval{
"Eval",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expression, expression,
} }
} }
func (n Eval) Name() string {
return "Eval"
}
func (n Eval) Attributes() map[string]interface{} { func (n Eval) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type Exit struct { type Exit struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
expr node.Node expr node.Node
@ -13,7 +12,6 @@ type Exit struct {
func NewExit(expr node.Node, isDie bool) node.Node { func NewExit(expr node.Node, isDie bool) node.Node {
return Exit{ return Exit{
"Exit",
map[string]interface{}{ map[string]interface{}{
"isDie": isDie, "isDie": isDie,
}, },
@ -22,10 +20,6 @@ func NewExit(expr node.Node, isDie bool) node.Node {
} }
} }
func (n Exit) Name() string {
return "Exit"
}
func (n Exit) Attributes() map[string]interface{} { func (n Exit) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type FunctionCall struct { type FunctionCall struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
function node.Node function node.Node
@ -14,7 +13,6 @@ type FunctionCall struct {
func NewFunctionCall(function node.Node, arguments []node.Node) node.Node { func NewFunctionCall(function node.Node, arguments []node.Node) node.Node {
return FunctionCall{ return FunctionCall{
"FunctionCall",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
function, function,
@ -22,10 +20,6 @@ func NewFunctionCall(function node.Node, arguments []node.Node) node.Node {
} }
} }
func (n FunctionCall) Name() string {
return "FunctionCall"
}
func (n FunctionCall) Attributes() map[string]interface{} { func (n FunctionCall) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type Include struct { type Include struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
expr node.Node expr node.Node
@ -13,17 +12,12 @@ type Include struct {
func NewInclude(expression node.Node) node.Node { func NewInclude(expression node.Node) node.Node {
return Include{ return Include{
"Include",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expression, expression,
} }
} }
func (n Include) Name() string {
return "Include"
}
func (n Include) Attributes() map[string]interface{} { func (n Include) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type IncludeOnce struct { type IncludeOnce struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
expr node.Node expr node.Node
@ -13,17 +12,12 @@ type IncludeOnce struct {
func NewIncludeOnce(expression node.Node) node.Node { func NewIncludeOnce(expression node.Node) node.Node {
return IncludeOnce{ return IncludeOnce{
"IncludeOnce",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expression, expression,
} }
} }
func (n IncludeOnce) Name() string {
return "IncludeOnce"
}
func (n IncludeOnce) Attributes() map[string]interface{} { func (n IncludeOnce) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type InstanceOf struct { type InstanceOf struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
expr node.Node expr node.Node
@ -14,7 +13,6 @@ type InstanceOf struct {
func NewInstanceOf(expr node.Node, class node.Node) node.Node { func NewInstanceOf(expr node.Node, class node.Node) node.Node {
return InstanceOf{ return InstanceOf{
"InstanceOf",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expr, expr,
@ -22,10 +20,6 @@ func NewInstanceOf(expr node.Node, class node.Node) node.Node {
} }
} }
func (n InstanceOf) Name() string {
return "InstanceOf"
}
func (n InstanceOf) Attributes() map[string]interface{} { func (n InstanceOf) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type Isset struct { type Isset struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
variables []node.Node variables []node.Node
@ -13,17 +12,12 @@ type Isset struct {
func NewIsset(variables []node.Node) node.Node { func NewIsset(variables []node.Node) node.Node {
return Isset{ return Isset{
"Isset",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variables, variables,
} }
} }
func (n Isset) Name() string {
return "Isset"
}
func (n Isset) Attributes() map[string]interface{} { func (n Isset) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type List struct { type List struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
items []node.Node items []node.Node
@ -13,17 +12,12 @@ type List struct {
func NewList(items []node.Node) node.Node { func NewList(items []node.Node) node.Node {
return List{ return List{
"List",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
items, items,
} }
} }
func (n List) Name() string {
return "List"
}
func (n List) Attributes() map[string]interface{} { func (n List) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type MethodCall struct { type MethodCall struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
variable node.Node variable node.Node
@ -15,7 +14,6 @@ type MethodCall struct {
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{
"MethodCall",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -24,10 +22,6 @@ func NewMethodCall(variable node.Node, method node.Node, arguments []node.Node)
} }
} }
func (n MethodCall) Name() string {
return "MethodCall"
}
func (n MethodCall) Attributes() map[string]interface{} { func (n MethodCall) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type New struct { type New struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
class node.Node class node.Node
@ -14,7 +13,6 @@ type New struct {
func NewNew(class node.Node, arguments []node.Node) node.Node { func NewNew(class node.Node, arguments []node.Node) node.Node {
return New{ return New{
"New",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
class, class,
@ -22,10 +20,6 @@ func NewNew(class node.Node, arguments []node.Node) node.Node {
} }
} }
func (n New) Name() string {
return "New"
}
func (n New) Attributes() map[string]interface{} { func (n New) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type PostDec struct { type PostDec struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
variable node.Node variable node.Node
@ -13,17 +12,12 @@ type PostDec struct {
func NewPostDec(variable node.Node) node.Node { func NewPostDec(variable node.Node) node.Node {
return PostDec{ return PostDec{
"PostDec",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
} }
} }
func (n PostDec) Name() string {
return "PostDec"
}
func (n PostDec) Attributes() map[string]interface{} { func (n PostDec) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type PostInc struct { type PostInc struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
variable node.Node variable node.Node
@ -13,17 +12,12 @@ type PostInc struct {
func NewPostInc(variable node.Node) node.Node { func NewPostInc(variable node.Node) node.Node {
return PostInc{ return PostInc{
"PostInc",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
} }
} }
func (n PostInc) Name() string {
return "PostInc"
}
func (n PostInc) Attributes() map[string]interface{} { func (n PostInc) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type PreDec struct { type PreDec struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
variable node.Node variable node.Node
@ -13,17 +12,12 @@ type PreDec struct {
func NewPreDec(variable node.Node) node.Node { func NewPreDec(variable node.Node) node.Node {
return PreDec{ return PreDec{
"PreDec",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
} }
} }
func (n PreDec) Name() string {
return "PreDec"
}
func (n PreDec) Attributes() map[string]interface{} { func (n PreDec) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type PreInc struct { type PreInc struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
variable node.Node variable node.Node
@ -13,17 +12,12 @@ type PreInc struct {
func NewPreInc(variable node.Node) node.Node { func NewPreInc(variable node.Node) node.Node {
return PreInc{ return PreInc{
"PreInc",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
} }
} }
func (n PreInc) Name() string {
return "PreInc"
}
func (n PreInc) Attributes() map[string]interface{} { func (n PreInc) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type Print struct { type Print struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
expr node.Node expr node.Node
@ -13,17 +12,12 @@ type Print struct {
func NewPrint(expression node.Node) node.Node { func NewPrint(expression node.Node) node.Node {
return Print{ return Print{
"Print",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expression, expression,
} }
} }
func (n Print) Name() string {
return "Print"
}
func (n Print) Attributes() map[string]interface{} { func (n Print) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type PropertyFetch struct { type PropertyFetch struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
variable node.Node variable node.Node
@ -14,7 +13,6 @@ type PropertyFetch struct {
func NewPropertyFetch(variable node.Node, property node.Node) node.Node { func NewPropertyFetch(variable node.Node, property node.Node) node.Node {
return PropertyFetch{ return PropertyFetch{
"PropertyFetch",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
variable, variable,
@ -22,10 +20,6 @@ func NewPropertyFetch(variable node.Node, property node.Node) node.Node {
} }
} }
func (n PropertyFetch) Name() string {
return "PropertyFetch"
}
func (n PropertyFetch) Attributes() map[string]interface{} { func (n PropertyFetch) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type Require struct { type Require struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
expr node.Node expr node.Node
@ -13,17 +12,12 @@ type Require struct {
func NewRequire(expression node.Node) node.Node { func NewRequire(expression node.Node) node.Node {
return Require{ return Require{
"Require",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expression, expression,
} }
} }
func (n Require) Name() string {
return "Require"
}
func (n Require) Attributes() map[string]interface{} { func (n Require) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type RequireOnce struct { type RequireOnce struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
expr node.Node expr node.Node
@ -13,17 +12,12 @@ type RequireOnce struct {
func NewRequireOnce(expression node.Node) node.Node { func NewRequireOnce(expression node.Node) node.Node {
return RequireOnce{ return RequireOnce{
"RequireOnce",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expression, expression,
} }
} }
func (n RequireOnce) Name() string {
return "RequireOnce"
}
func (n RequireOnce) Attributes() map[string]interface{} { func (n RequireOnce) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type ShellExec struct { type ShellExec struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
parts []node.Node parts []node.Node
@ -13,17 +12,12 @@ type ShellExec struct {
func NewShellExec(parts []node.Node) node.Node { func NewShellExec(parts []node.Node) node.Node {
return ShellExec{ return ShellExec{
"ShellExec",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
parts, parts,
} }
} }
func (n ShellExec) Name() string {
return "ShellExec"
}
func (n ShellExec) Attributes() map[string]interface{} { func (n ShellExec) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type ShortArray struct { type ShortArray struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
items []node.Node items []node.Node
@ -13,17 +12,12 @@ type ShortArray struct {
func NewShortArray(items []node.Node) node.Node { func NewShortArray(items []node.Node) node.Node {
return ShortArray{ return ShortArray{
"ShortArray",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
items, items,
} }
} }
func (n ShortArray) Name() string {
return "ShortArray"
}
func (n ShortArray) Attributes() map[string]interface{} { func (n ShortArray) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type ShortList struct { type ShortList struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
items []node.Node items []node.Node
@ -13,17 +12,12 @@ type ShortList struct {
func NewShortList(items []node.Node) node.Node { func NewShortList(items []node.Node) node.Node {
return ShortList{ return ShortList{
"ShortList",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
items, items,
} }
} }
func (n ShortList) Name() string {
return "ShortList"
}
func (n ShortList) Attributes() map[string]interface{} { func (n ShortList) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type StaticCall struct { type StaticCall struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
class node.Node class node.Node
@ -15,7 +14,6 @@ type StaticCall struct {
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{
"StaticCall",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
class, class,
@ -24,10 +22,6 @@ func NewStaticCall(class node.Node, call node.Node, arguments []node.Node) node.
} }
} }
func (n StaticCall) Name() string {
return "StaticCall"
}
func (n StaticCall) Attributes() map[string]interface{} { func (n StaticCall) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type StaticPropertyFetch struct { type StaticPropertyFetch struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
class node.Node class node.Node
@ -14,7 +13,6 @@ type StaticPropertyFetch struct {
func NewStaticPropertyFetch(class node.Node, property node.Node) node.Node { func NewStaticPropertyFetch(class node.Node, property node.Node) node.Node {
return StaticPropertyFetch{ return StaticPropertyFetch{
"StaticPropertyFetch",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
class, class,
@ -22,10 +20,6 @@ func NewStaticPropertyFetch(class node.Node, property node.Node) node.Node {
} }
} }
func (n StaticPropertyFetch) Name() string {
return "StaticPropertyFetch"
}
func (n StaticPropertyFetch) Attributes() map[string]interface{} { func (n StaticPropertyFetch) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type Ternary struct { type Ternary struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
condition node.Node condition node.Node
@ -15,7 +14,6 @@ type Ternary struct {
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{
"Ternary",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
condition, condition,
@ -24,10 +22,6 @@ func NewTernary(condition node.Node, ifTrue node.Node, ifFalse node.Node) node.N
} }
} }
func (n Ternary) Name() string {
return "Ternary"
}
func (n Ternary) Attributes() map[string]interface{} { func (n Ternary) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type UnaryMinus struct { type UnaryMinus struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
expr node.Node expr node.Node
@ -13,17 +12,12 @@ type UnaryMinus struct {
func NewUnaryMinus(expression node.Node) node.Node { func NewUnaryMinus(expression node.Node) node.Node {
return UnaryMinus{ return UnaryMinus{
"UnaryMinus",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expression, expression,
} }
} }
func (n UnaryMinus) Name() string {
return "UnaryMinus"
}
func (n UnaryMinus) Attributes() map[string]interface{} { func (n UnaryMinus) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type UnaryPlus struct { type UnaryPlus struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
expr node.Node expr node.Node
@ -13,17 +12,12 @@ type UnaryPlus struct {
func NewUnaryPlus(expression node.Node) node.Node { func NewUnaryPlus(expression node.Node) node.Node {
return UnaryPlus{ return UnaryPlus{
"UnaryPlus",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expression, expression,
} }
} }
func (n UnaryPlus) Name() string {
return "UnaryPlus"
}
func (n UnaryPlus) Attributes() map[string]interface{} { func (n UnaryPlus) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type Variable struct { type Variable struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
varName node.Node varName node.Node
@ -13,17 +12,12 @@ type Variable struct {
func NewVariable(varName node.Node) node.Node { func NewVariable(varName node.Node) node.Node {
return Variable{ return Variable{
"Variable",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
varName, varName,
} }
} }
func (n Variable) Name() string {
return "Variable"
}
func (n Variable) Attributes() map[string]interface{} { func (n Variable) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type Yield struct { type Yield struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
key node.Node key node.Node
@ -14,7 +13,6 @@ type Yield struct {
func NewYield(key node.Node, value node.Node) node.Node { func NewYield(key node.Node, value node.Node) node.Node {
return Yield{ return Yield{
"Yield",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
key, key,
@ -22,10 +20,6 @@ func NewYield(key node.Node, value node.Node) node.Node {
} }
} }
func (n Yield) Name() string {
return "Yield"
}
func (n Yield) Attributes() map[string]interface{} { func (n Yield) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,7 +5,6 @@ import (
) )
type YieldFrom struct { type YieldFrom struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
expr node.Node expr node.Node
@ -13,17 +12,12 @@ type YieldFrom struct {
func NewYieldFrom(expression node.Node) node.Node { func NewYieldFrom(expression node.Node) node.Node {
return YieldFrom{ return YieldFrom{
"YieldFrom",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
expression, expression,
} }
} }
func (n YieldFrom) Name() string {
return "YieldFrom"
}
func (n YieldFrom) Attributes() map[string]interface{} { func (n YieldFrom) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,14 +5,12 @@ import (
) )
type Identifier struct { type Identifier struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *Position position *Position
} }
func NewIdentifier(token token.Token) Node { func NewIdentifier(token token.Token) Node {
return Identifier{ return Identifier{
"Identifier",
map[string]interface{}{ map[string]interface{}{
"value": token.Value, "value": token.Value,
}, },
@ -20,10 +18,6 @@ func NewIdentifier(token token.Token) Node {
} }
} }
func (n Identifier) Name() string {
return "Identifier"
}
func (n Identifier) Attributes() map[string]interface{} { func (n Identifier) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,13 +5,12 @@ import (
) )
type FullyQualified struct { type FullyQualified struct {
NameNode Name
} }
func NewFullyQualified(parts []node.Node) node.Node { func NewFullyQualified(parts []node.Node) node.Node {
return FullyQualified{ return FullyQualified{
NameNode{ Name{
"FullyQualifiedName",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
parts, parts,
@ -19,10 +18,6 @@ func NewFullyQualified(parts []node.Node) node.Node {
} }
} }
func (n FullyQualified) Name() string {
return "FullyQualified"
}
func (n FullyQualified) Attributes() map[string]interface{} { func (n FullyQualified) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -4,49 +4,43 @@ import (
"github.com/z7zmey/php-parser/node" "github.com/z7zmey/php-parser/node"
) )
type NameNode struct { type Name struct {
name string
attributes map[string]interface{} 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 NameNode{ return Name{
"Name",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
parts, parts,
} }
} }
func (n NameNode) Name() string { func (n Name) Attributes() map[string]interface{} {
return "Name"
}
func (n NameNode) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }
func (n NameNode) Attribute(key string) interface{} { func (n Name) Attribute(key string) interface{} {
return n.attributes[key] return n.attributes[key]
} }
func (n NameNode) SetAttribute(key string, value interface{}) node.Node { func (n Name) SetAttribute(key string, value interface{}) node.Node {
n.attributes[key] = value n.attributes[key] = value
return n return n
} }
func (n NameNode) Position() *node.Position { func (n Name) Position() *node.Position {
return n.position return n.position
} }
func (n NameNode) SetPosition(p *node.Position) node.Node { func (n Name) SetPosition(p *node.Position) node.Node {
n.position = p n.position = p
return n return n
} }
func (n NameNode) Walk(v node.Visitor) { func (n Name) Walk(v node.Visitor) {
if v.EnterNode(n) == false { if v.EnterNode(n) == false {
return return
} }

View File

@ -5,14 +5,12 @@ import (
) )
type NamePart struct { type NamePart struct {
name string
attributes map[string]interface{} attributes map[string]interface{}
position *node.Position position *node.Position
} }
func NewNamePart(value string) node.Node { func NewNamePart(value string) node.Node {
return NamePart{ return NamePart{
"NamePart",
map[string]interface{}{ map[string]interface{}{
"value": value, "value": value,
}, },
@ -20,10 +18,6 @@ func NewNamePart(value string) node.Node {
} }
} }
func (n NamePart) Name() string {
return "NamePart"
}
func (n NamePart) Attributes() map[string]interface{} { func (n NamePart) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -5,13 +5,12 @@ import (
) )
type Relative struct { type Relative struct {
NameNode Name
} }
func NewRelative(parts []node.Node) node.Node { func NewRelative(parts []node.Node) node.Node {
return Relative{ return Relative{
NameNode{ Name{
"RelativeName",
map[string]interface{}{}, map[string]interface{}{},
nil, nil,
parts, parts,
@ -19,10 +18,6 @@ func NewRelative(parts []node.Node) node.Node {
} }
} }
func (n Relative) Name() string {
return "Relative"
}
func (n Relative) Attributes() map[string]interface{} { func (n Relative) Attributes() map[string]interface{} {
return n.attributes return n.attributes
} }

View File

@ -3,7 +3,6 @@ package node
type Node interface { type Node interface {
Attributer Attributer
Positioner Positioner
Name() string
Walk(v Visitor) Walk(v Visitor)
} }

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