add attributes fiald to all nodes

This commit is contained in:
vadim 2017-12-29 17:53:13 +02:00
parent 70a4ef18ab
commit cdb405fcc7
151 changed files with 586 additions and 359 deletions

View File

@ -13,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, n.Name())
if a := n.Attributes(); a != nil { if a := n.Attributes(); len(a) > 0 {
fmt.Printf(" %v", a) fmt.Printf(" %v", a)
} }
fmt.Println() fmt.Println()

View File

@ -5,13 +5,15 @@ import (
) )
type Array struct { type Array struct {
name string name string
items []node.Node attributes map[string]interface{}
items []node.Node
} }
func NewArray(items []node.Node) node.Node { func NewArray(items []node.Node) node.Node {
return Array{ return Array{
"Array", "Array",
map[string]interface{}{},
items, items,
} }
} }
@ -21,7 +23,7 @@ func (n Array) Name() string {
} }
func (n Array) Attributes() map[string]interface{} { func (n Array) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Array) Walk(v node.Visitor) { func (n Array) Walk(v node.Visitor) {

View File

@ -5,14 +5,16 @@ import (
) )
type ArrayDimFetch struct { type ArrayDimFetch struct {
name string name string
variable node.Node attributes map[string]interface{}
dim node.Node variable 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{
"ArrayDimFetch", "ArrayDimFetch",
map[string]interface{}{},
variable, variable,
dim, dim,
} }
@ -23,7 +25,7 @@ func (n ArrayDimFetch) Name() string {
} }
func (n ArrayDimFetch) Attributes() map[string]interface{} { func (n ArrayDimFetch) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n ArrayDimFetch) Walk(v node.Visitor) { func (n ArrayDimFetch) Walk(v node.Visitor) {

View File

@ -27,7 +27,7 @@ func (n ArrayItem) Name() string {
} }
func (n ArrayItem) Attributes() map[string]interface{} { func (n ArrayItem) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n ArrayItem) Walk(v node.Visitor) { func (n ArrayItem) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewAssign(variable node.Node, expression node.Node) node.Node {
return Assign{ return Assign{
AssignOp{ AssignOp{
"Assign", "Assign",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n Assign) Name() string {
} }
func (n Assign) Attributes() map[string]interface{} { func (n Assign) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Assign) Walk(v node.Visitor) { func (n Assign) Walk(v node.Visitor) {

View File

@ -6,6 +6,7 @@ import (
type AssignOp struct { type AssignOp struct {
name string name string
attributes map[string]interface{}
variable node.Node variable node.Node
expression node.Node expression node.Node
} }

View File

@ -12,6 +12,7 @@ func NewAssignRef(variable node.Node, expression node.Node) node.Node {
return AssignRef{ return AssignRef{
AssignOp{ AssignOp{
"AssignRef", "AssignRef",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n AssignRef) Name() string {
} }
func (n AssignRef) Attributes() map[string]interface{} { func (n AssignRef) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n AssignRef) Walk(v node.Visitor) { func (n AssignRef) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewBitwiseAnd(variable node.Node, expression node.Node) node.Node {
return BitwiseAnd{ return BitwiseAnd{
AssignOp{ AssignOp{
"AssignBitwiseAnd", "AssignBitwiseAnd",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n BitwiseAnd) Name() string {
} }
func (n BitwiseAnd) Attributes() map[string]interface{} { func (n BitwiseAnd) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n BitwiseAnd) Walk(v node.Visitor) { func (n BitwiseAnd) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewBitwiseOr(variable node.Node, expression node.Node) node.Node {
return BitwiseOr{ return BitwiseOr{
AssignOp{ AssignOp{
"AssignBitwiseOr", "AssignBitwiseOr",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n BitwiseOr) Name() string {
} }
func (n BitwiseOr) Attributes() map[string]interface{} { func (n BitwiseOr) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n BitwiseOr) Walk(v node.Visitor) { func (n BitwiseOr) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewBitwiseXor(variable node.Node, expression node.Node) node.Node {
return BitwiseXor{ return BitwiseXor{
AssignOp{ AssignOp{
"AssignBitwiseXor", "AssignBitwiseXor",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -19,7 +20,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 nil return n.attributes
} }
func (n BitwiseXor) Name() string { func (n BitwiseXor) Name() string {

View File

@ -12,6 +12,7 @@ func NewConcat(variable node.Node, expression node.Node) node.Node {
return Concat{ return Concat{
AssignOp{ AssignOp{
"AssignConcat", "AssignConcat",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n Concat) Name() string {
} }
func (n Concat) Attributes() map[string]interface{} { func (n Concat) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Concat) Walk(v node.Visitor) { func (n Concat) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewDiv(variable node.Node, expression node.Node) node.Node {
return Div{ return Div{
AssignOp{ AssignOp{
"AssignDiv", "AssignDiv",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n Div) Name() string {
} }
func (n Div) Attributes() map[string]interface{} { func (n Div) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Div) Walk(v node.Visitor) { func (n Div) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewMinus(variable node.Node, expression node.Node) node.Node {
return Minus{ return Minus{
AssignOp{ AssignOp{
"AssignMinus", "AssignMinus",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n Minus) Name() string {
} }
func (n Minus) Attributes() map[string]interface{} { func (n Minus) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Minus) Walk(v node.Visitor) { func (n Minus) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewMod(variable node.Node, expression node.Node) node.Node {
return Mod{ return Mod{
AssignOp{ AssignOp{
"AssignMod", "AssignMod",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n Mod) Name() string {
} }
func (n Mod) Attributes() map[string]interface{} { func (n Mod) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Mod) Walk(v node.Visitor) { func (n Mod) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewMul(variable node.Node, expression node.Node) node.Node {
return Mul{ return Mul{
AssignOp{ AssignOp{
"AssignMul", "AssignMul",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n Mul) Name() string {
} }
func (n Mul) Attributes() map[string]interface{} { func (n Mul) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Mul) Walk(v node.Visitor) { func (n Mul) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewPlus(variable node.Node, expression node.Node) node.Node {
return Plus{ return Plus{
AssignOp{ AssignOp{
"AssignPlus", "AssignPlus",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n Plus) Name() string {
} }
func (n Plus) Attributes() map[string]interface{} { func (n Plus) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Plus) Walk(v node.Visitor) { func (n Plus) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewPow(variable node.Node, expression node.Node) node.Node {
return Pow{ return Pow{
AssignOp{ AssignOp{
"AssignPow", "AssignPow",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n Pow) Name() string {
} }
func (n Pow) Attributes() map[string]interface{} { func (n Pow) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Pow) Walk(v node.Visitor) { func (n Pow) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewShiftLeft(variable node.Node, expression node.Node) node.Node {
return ShiftLeft{ return ShiftLeft{
AssignOp{ AssignOp{
"AssignShiftLeft", "AssignShiftLeft",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n ShiftLeft) Name() string {
} }
func (n ShiftLeft) Attributes() map[string]interface{} { func (n ShiftLeft) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n ShiftLeft) Walk(v node.Visitor) { func (n ShiftLeft) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewShiftRight(variable node.Node, expression node.Node) node.Node {
return ShiftRight{ return ShiftRight{
AssignOp{ AssignOp{
"AssignShiftRight", "AssignShiftRight",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n ShiftRight) Name() string {
} }
func (n ShiftRight) Attributes() map[string]interface{} { func (n ShiftRight) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n ShiftRight) Walk(v node.Visitor) { func (n ShiftRight) Walk(v node.Visitor) {

View File

@ -5,7 +5,8 @@ import (
) )
type BinaryOp struct { type BinaryOp struct {
name string name string
left node.Node attributes map[string]interface{}
right node.Node left node.Node
right node.Node
} }

View File

@ -12,6 +12,7 @@ func NewBitwiseAnd(variable node.Node, expression node.Node) node.Node {
return BitwiseAnd{ return BitwiseAnd{
BinaryOp{ BinaryOp{
"BinaryBitwiseAnd", "BinaryBitwiseAnd",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n BitwiseAnd) Name() string {
} }
func (n BitwiseAnd) Attributes() map[string]interface{} { func (n BitwiseAnd) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n BitwiseAnd) Walk(v node.Visitor) { func (n BitwiseAnd) Walk(v node.Visitor) {

View File

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

View File

@ -12,6 +12,7 @@ func NewBitwiseXor(variable node.Node, expression node.Node) node.Node {
return BitwiseXor{ return BitwiseXor{
BinaryOp{ BinaryOp{
"BinaryBitwiseXor", "BinaryBitwiseXor",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -19,7 +20,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 nil return n.attributes
} }
func (n BitwiseXor) Name() string { func (n BitwiseXor) Name() string {

View File

@ -12,6 +12,7 @@ func NewBooleanAnd(variable node.Node, expression node.Node) node.Node {
return BooleanAnd{ return BooleanAnd{
BinaryOp{ BinaryOp{
"BinaryBooleanAnd", "BinaryBooleanAnd",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n BooleanAnd) Name() string {
} }
func (n BooleanAnd) Attributes() map[string]interface{} { func (n BooleanAnd) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n BooleanAnd) Walk(v node.Visitor) { func (n BooleanAnd) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewBooleanOr(variable node.Node, expression node.Node) node.Node {
return BooleanOr{ return BooleanOr{
BinaryOp{ BinaryOp{
"BinaryBooleanOr", "BinaryBooleanOr",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n BooleanOr) Name() string {
} }
func (n BooleanOr) Attributes() map[string]interface{} { func (n BooleanOr) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n BooleanOr) Walk(v node.Visitor) { func (n BooleanOr) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewCoalesce(variable node.Node, expression node.Node) node.Node {
return Coalesce{ return Coalesce{
BinaryOp{ BinaryOp{
"BinaryCoalesce", "BinaryCoalesce",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n Coalesce) Name() string {
} }
func (n Coalesce) Attributes() map[string]interface{} { func (n Coalesce) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Coalesce) Walk(v node.Visitor) { func (n Coalesce) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewConcat(variable node.Node, expression node.Node) node.Node {
return Concat{ return Concat{
BinaryOp{ BinaryOp{
"BinaryConcat", "BinaryConcat",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n Concat) Name() string {
} }
func (n Concat) Attributes() map[string]interface{} { func (n Concat) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Concat) Walk(v node.Visitor) { func (n Concat) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewDiv(variable node.Node, expression node.Node) node.Node {
return Div{ return Div{
BinaryOp{ BinaryOp{
"BinaryDiv", "BinaryDiv",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n Div) Name() string {
} }
func (n Div) Attributes() map[string]interface{} { func (n Div) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Div) Walk(v node.Visitor) { func (n Div) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewEqual(variable node.Node, expression node.Node) node.Node {
return Equal{ return Equal{
BinaryOp{ BinaryOp{
"BinaryEqual", "BinaryEqual",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n Equal) Name() string {
} }
func (n Equal) Attributes() map[string]interface{} { func (n Equal) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Equal) Walk(v node.Visitor) { func (n Equal) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewGreater(variable node.Node, expression node.Node) node.Node {
return Greater{ return Greater{
BinaryOp{ BinaryOp{
"BinaryGreater", "BinaryGreater",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n Greater) Name() string {
} }
func (n Greater) Attributes() map[string]interface{} { func (n Greater) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Greater) Walk(v node.Visitor) { func (n Greater) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewGreaterOrEqual(variable node.Node, expression node.Node) node.Node {
return GreaterOrEqual{ return GreaterOrEqual{
BinaryOp{ BinaryOp{
"BinaryGreaterOrEqual", "BinaryGreaterOrEqual",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n GreaterOrEqual) Name() string {
} }
func (n GreaterOrEqual) Attributes() map[string]interface{} { func (n GreaterOrEqual) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n GreaterOrEqual) Walk(v node.Visitor) { func (n GreaterOrEqual) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewIdentical(variable node.Node, expression node.Node) node.Node {
return Identical{ return Identical{
BinaryOp{ BinaryOp{
"BinaryIdentical", "BinaryIdentical",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n Identical) Name() string {
} }
func (n Identical) Attributes() map[string]interface{} { func (n Identical) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Identical) Walk(v node.Visitor) { func (n Identical) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewLogicalAnd(variable node.Node, expression node.Node) node.Node {
return LogicalAnd{ return LogicalAnd{
BinaryOp{ BinaryOp{
"BinaryLogicalAnd", "BinaryLogicalAnd",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n LogicalAnd) Name() string {
} }
func (n LogicalAnd) Attributes() map[string]interface{} { func (n LogicalAnd) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n LogicalAnd) Walk(v node.Visitor) { func (n LogicalAnd) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewLogicalOr(variable node.Node, expression node.Node) node.Node {
return LogicalOr{ return LogicalOr{
BinaryOp{ BinaryOp{
"BinaryLogicalOr", "BinaryLogicalOr",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n LogicalOr) Name() string {
} }
func (n LogicalOr) Attributes() map[string]interface{} { func (n LogicalOr) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n LogicalOr) Walk(v node.Visitor) { func (n LogicalOr) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewLogicalXor(variable node.Node, expression node.Node) node.Node {
return LogicalXor{ return LogicalXor{
BinaryOp{ BinaryOp{
"BinaryLogicalXor", "BinaryLogicalXor",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n LogicalXor) Name() string {
} }
func (n LogicalXor) Attributes() map[string]interface{} { func (n LogicalXor) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n LogicalXor) Walk(v node.Visitor) { func (n LogicalXor) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewMinus(variable node.Node, expression node.Node) node.Node {
return Minus{ return Minus{
BinaryOp{ BinaryOp{
"BinaryMinus", "BinaryMinus",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n Minus) Name() string {
} }
func (n Minus) Attributes() map[string]interface{} { func (n Minus) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Minus) Walk(v node.Visitor) { func (n Minus) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewMod(variable node.Node, expression node.Node) node.Node {
return Mod{ return Mod{
BinaryOp{ BinaryOp{
"BinaryMod", "BinaryMod",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n Mod) Name() string {
} }
func (n Mod) Attributes() map[string]interface{} { func (n Mod) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Mod) Walk(v node.Visitor) { func (n Mod) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewMul(variable node.Node, expression node.Node) node.Node {
return Mul{ return Mul{
BinaryOp{ BinaryOp{
"BinaryMul", "BinaryMul",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n Mul) Name() string {
} }
func (n Mul) Attributes() map[string]interface{} { func (n Mul) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Mul) Walk(v node.Visitor) { func (n Mul) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewNotEqual(variable node.Node, expression node.Node) node.Node {
return NotEqual{ return NotEqual{
BinaryOp{ BinaryOp{
"BinaryNotEqual", "BinaryNotEqual",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n NotEqual) Name() string {
} }
func (n NotEqual) Attributes() map[string]interface{} { func (n NotEqual) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n NotEqual) Walk(v node.Visitor) { func (n NotEqual) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewNotIdentical(variable node.Node, expression node.Node) node.Node {
return NotIdentical{ return NotIdentical{
BinaryOp{ BinaryOp{
"BinaryNotIdentical", "BinaryNotIdentical",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n NotIdentical) Name() string {
} }
func (n NotIdentical) Attributes() map[string]interface{} { func (n NotIdentical) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n NotIdentical) Walk(v node.Visitor) { func (n NotIdentical) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewPlus(variable node.Node, expression node.Node) node.Node {
return Plus{ return Plus{
BinaryOp{ BinaryOp{
"BinaryPlus", "BinaryPlus",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n Plus) Name() string {
} }
func (n Plus) Attributes() map[string]interface{} { func (n Plus) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Plus) Walk(v node.Visitor) { func (n Plus) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewPow(variable node.Node, expression node.Node) node.Node {
return Pow{ return Pow{
BinaryOp{ BinaryOp{
"BinaryPow", "BinaryPow",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n Pow) Name() string {
} }
func (n Pow) Attributes() map[string]interface{} { func (n Pow) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Pow) Walk(v node.Visitor) { func (n Pow) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewShiftLeft(variable node.Node, expression node.Node) node.Node {
return ShiftLeft{ return ShiftLeft{
BinaryOp{ BinaryOp{
"BinaryShiftLeft", "BinaryShiftLeft",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n ShiftLeft) Name() string {
} }
func (n ShiftLeft) Attributes() map[string]interface{} { func (n ShiftLeft) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n ShiftLeft) Walk(v node.Visitor) { func (n ShiftLeft) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewShiftRight(variable node.Node, expression node.Node) node.Node {
return ShiftRight{ return ShiftRight{
BinaryOp{ BinaryOp{
"BinaryShiftRight", "BinaryShiftRight",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n ShiftRight) Name() string {
} }
func (n ShiftRight) Attributes() map[string]interface{} { func (n ShiftRight) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n ShiftRight) Walk(v node.Visitor) { func (n ShiftRight) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewSmaller(variable node.Node, expression node.Node) node.Node {
return Smaller{ return Smaller{
BinaryOp{ BinaryOp{
"BinarySmaller", "BinarySmaller",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n Smaller) Name() string {
} }
func (n Smaller) Attributes() map[string]interface{} { func (n Smaller) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Smaller) Walk(v node.Visitor) { func (n Smaller) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewSmallerOrEqual(variable node.Node, expression node.Node) node.Node {
return SmallerOrEqual{ return SmallerOrEqual{
BinaryOp{ BinaryOp{
"BinarySmallerOrEqual", "BinarySmallerOrEqual",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n SmallerOrEqual) Name() string {
} }
func (n SmallerOrEqual) Attributes() map[string]interface{} { func (n SmallerOrEqual) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n SmallerOrEqual) Walk(v node.Visitor) { func (n SmallerOrEqual) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewSpaceship(variable node.Node, expression node.Node) node.Node {
return Spaceship{ return Spaceship{
BinaryOp{ BinaryOp{
"BinarySpaceship", "BinarySpaceship",
map[string]interface{}{},
variable, variable,
expression, expression,
}, },
@ -23,7 +24,7 @@ func (n Spaceship) Name() string {
} }
func (n Spaceship) Attributes() map[string]interface{} { func (n Spaceship) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Spaceship) Walk(v node.Visitor) { func (n Spaceship) Walk(v node.Visitor) {

View File

@ -5,13 +5,15 @@ import (
) )
type BitwiseNot struct { type BitwiseNot struct {
name string name string
expr node.Node attributes map[string]interface{}
expr node.Node
} }
func NewBitwiseNot(expression node.Node) node.Node { func NewBitwiseNot(expression node.Node) node.Node {
return BitwiseNot{ return BitwiseNot{
"BitwiseNot", "BitwiseNot",
map[string]interface{}{},
expression, expression,
} }
} }
@ -21,7 +23,7 @@ func (n BitwiseNot) Name() string {
} }
func (n BitwiseNot) Attributes() map[string]interface{} { func (n BitwiseNot) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n BitwiseNot) Walk(v node.Visitor) { func (n BitwiseNot) Walk(v node.Visitor) {

View File

@ -5,13 +5,15 @@ import (
) )
type BooleanNot struct { type BooleanNot struct {
name string name string
expr node.Node attributes map[string]interface{}
expr node.Node
} }
func NewBooleanNot(expression node.Node) node.Node { func NewBooleanNot(expression node.Node) node.Node {
return BooleanNot{ return BooleanNot{
"BooleanNot", "BooleanNot",
map[string]interface{}{},
expression, expression,
} }
} }
@ -21,7 +23,7 @@ func (n BooleanNot) Name() string {
} }
func (n BooleanNot) Attributes() map[string]interface{} { func (n BooleanNot) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n BooleanNot) Walk(v node.Visitor) { func (n BooleanNot) Walk(v node.Visitor) {

View File

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

View File

@ -12,6 +12,7 @@ func NewCastArray(expr node.Node) node.Node {
return CastArray{ return CastArray{
Cast{ Cast{
"CastArray", "CastArray",
map[string]interface{}{},
expr, expr,
}, },
} }
@ -22,7 +23,7 @@ func (n CastArray) Name() string {
} }
func (n CastArray) Attributes() map[string]interface{} { func (n CastArray) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n CastArray) Walk(v node.Visitor) { func (n CastArray) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewCastBool(expr node.Node) node.Node {
return CastBool{ return CastBool{
Cast{ Cast{
"CastBool", "CastBool",
map[string]interface{}{},
expr, expr,
}, },
} }
@ -22,7 +23,7 @@ func (n CastBool) Name() string {
} }
func (n CastBool) Attributes() map[string]interface{} { func (n CastBool) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n CastBool) Walk(v node.Visitor) { func (n CastBool) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewCastDouble(expr node.Node) node.Node {
return CastDouble{ return CastDouble{
Cast{ Cast{
"CastDouble", "CastDouble",
map[string]interface{}{},
expr, expr,
}, },
} }
@ -22,7 +23,7 @@ func (n CastDouble) Name() string {
} }
func (n CastDouble) Attributes() map[string]interface{} { func (n CastDouble) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n CastDouble) Walk(v node.Visitor) { func (n CastDouble) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewCastInt(expr node.Node) node.Node {
return CastInt{ return CastInt{
Cast{ Cast{
"CastInt", "CastInt",
map[string]interface{}{},
expr, expr,
}, },
} }
@ -22,7 +23,7 @@ func (n CastInt) Name() string {
} }
func (n CastInt) Attributes() map[string]interface{} { func (n CastInt) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n CastInt) Walk(v node.Visitor) { func (n CastInt) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewCastObject(expr node.Node) node.Node {
return CastObject{ return CastObject{
Cast{ Cast{
"CastObject", "CastObject",
map[string]interface{}{},
expr, expr,
}, },
} }
@ -22,7 +23,7 @@ func (n CastObject) Name() string {
} }
func (n CastObject) Attributes() map[string]interface{} { func (n CastObject) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n CastObject) Walk(v node.Visitor) { func (n CastObject) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewCastString(expr node.Node) node.Node {
return CastString{ return CastString{
Cast{ Cast{
"CastString", "CastString",
map[string]interface{}{},
expr, expr,
}, },
} }
@ -22,7 +23,7 @@ func (n CastString) Name() string {
} }
func (n CastString) Attributes() map[string]interface{} { func (n CastString) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n CastString) Walk(v node.Visitor) { func (n CastString) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewCastUnset(expr node.Node) node.Node {
return CastUnset{ return CastUnset{
Cast{ Cast{
"CastUnset", "CastUnset",
map[string]interface{}{},
expr, expr,
}, },
} }
@ -22,7 +23,7 @@ func (n CastUnset) Name() string {
} }
func (n CastUnset) Attributes() map[string]interface{} { func (n CastUnset) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n CastUnset) Walk(v node.Visitor) { func (n CastUnset) Walk(v node.Visitor) {

View File

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

View File

@ -5,13 +5,15 @@ import (
) )
type Clone struct { type Clone struct {
name string name string
expr node.Node attributes map[string]interface{}
expr node.Node
} }
func NewClone(expression node.Node) node.Node { func NewClone(expression node.Node) node.Node {
return Clone{ return Clone{
"Clone", "Clone",
map[string]interface{}{},
expression, expression,
} }
} }
@ -21,7 +23,7 @@ func (n Clone) Name() string {
} }
func (n Clone) Attributes() map[string]interface{} { func (n Clone) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Clone) Walk(v node.Visitor) { func (n Clone) Walk(v node.Visitor) {

View File

@ -32,7 +32,7 @@ func (n Closure) Name() string {
} }
func (n Closure) Attributes() map[string]interface{} { func (n Closure) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Closure) Walk(v node.Visitor) { func (n Closure) Walk(v node.Visitor) {

View File

@ -25,7 +25,7 @@ func (n ClusureUse) Name() string {
} }
func (n ClusureUse) Attributes() map[string]interface{} { func (n ClusureUse) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n ClusureUse) Walk(v node.Visitor) { func (n ClusureUse) Walk(v node.Visitor) {

View File

@ -5,13 +5,15 @@ import (
) )
type ConstFetch struct { type ConstFetch struct {
name string name string
constant node.Node attributes map[string]interface{}
constant node.Node
} }
func NewConstFetch(constant node.Node) node.Node { func NewConstFetch(constant node.Node) node.Node {
return ConstFetch{ return ConstFetch{
"ConstFetch", "ConstFetch",
map[string]interface{}{},
constant, constant,
} }
} }
@ -21,7 +23,7 @@ func (n ConstFetch) Name() string {
} }
func (n ConstFetch) Attributes() map[string]interface{} { func (n ConstFetch) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n ConstFetch) Walk(v node.Visitor) { func (n ConstFetch) Walk(v node.Visitor) {

View File

@ -5,13 +5,15 @@ import (
) )
type Empty struct { type Empty struct {
name string name string
expr node.Node attributes map[string]interface{}
expr node.Node
} }
func NewEmpty(expression node.Node) node.Node { func NewEmpty(expression node.Node) node.Node {
return Empty{ return Empty{
"Empty", "Empty",
map[string]interface{}{},
expression, expression,
} }
} }
@ -21,7 +23,7 @@ func (n Empty) Name() string {
} }
func (n Empty) Attributes() map[string]interface{} { func (n Empty) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Empty) Walk(v node.Visitor) { func (n Empty) Walk(v node.Visitor) {

View File

@ -5,13 +5,15 @@ import (
) )
type ErrorSuppress struct { type ErrorSuppress struct {
name string name string
expr node.Node attributes map[string]interface{}
expr node.Node
} }
func NewErrorSuppress(expression node.Node) node.Node { func NewErrorSuppress(expression node.Node) node.Node {
return ErrorSuppress{ return ErrorSuppress{
"ErrorSuppress", "ErrorSuppress",
map[string]interface{}{},
expression, expression,
} }
} }
@ -21,7 +23,7 @@ func (n ErrorSuppress) Name() string {
} }
func (n ErrorSuppress) Attributes() map[string]interface{} { func (n ErrorSuppress) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n ErrorSuppress) Walk(v node.Visitor) { func (n ErrorSuppress) Walk(v node.Visitor) {

View File

@ -5,13 +5,15 @@ import (
) )
type Eval struct { type Eval struct {
name string name string
expr node.Node attributes map[string]interface{}
expr node.Node
} }
func NewEval(expression node.Node) node.Node { func NewEval(expression node.Node) node.Node {
return Eval{ return Eval{
"Eval", "Eval",
map[string]interface{}{},
expression, expression,
} }
} }
@ -21,7 +23,7 @@ func (n Eval) Name() string {
} }
func (n Eval) Attributes() map[string]interface{} { func (n Eval) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Eval) Walk(v node.Visitor) { func (n Eval) Walk(v node.Visitor) {

View File

@ -25,7 +25,7 @@ func (n Exit) Name() string {
} }
func (n Exit) Attributes() map[string]interface{} { func (n Exit) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Exit) Walk(v node.Visitor) { func (n Exit) Walk(v node.Visitor) {

View File

@ -5,14 +5,16 @@ import (
) )
type FunctionCall struct { type FunctionCall struct {
name string name string
function node.Node attributes map[string]interface{}
arguments []node.Node function 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{
"FunctionCall", "FunctionCall",
map[string]interface{}{},
function, function,
arguments, arguments,
} }
@ -23,7 +25,7 @@ func (n FunctionCall) Name() string {
} }
func (n FunctionCall) Attributes() map[string]interface{} { func (n FunctionCall) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n FunctionCall) Walk(v node.Visitor) { func (n FunctionCall) Walk(v node.Visitor) {

View File

@ -5,13 +5,15 @@ import (
) )
type Include struct { type Include struct {
name string name string
expr node.Node attributes map[string]interface{}
expr node.Node
} }
func NewInclude(expression node.Node) node.Node { func NewInclude(expression node.Node) node.Node {
return Include{ return Include{
"Include", "Include",
map[string]interface{}{},
expression, expression,
} }
} }
@ -21,7 +23,7 @@ func (n Include) Name() string {
} }
func (n Include) Attributes() map[string]interface{} { func (n Include) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Include) Walk(v node.Visitor) { func (n Include) Walk(v node.Visitor) {

View File

@ -5,13 +5,15 @@ import (
) )
type IncludeOnce struct { type IncludeOnce struct {
name string name string
expr node.Node attributes map[string]interface{}
expr node.Node
} }
func NewIncludeOnce(expression node.Node) node.Node { func NewIncludeOnce(expression node.Node) node.Node {
return IncludeOnce{ return IncludeOnce{
"IncludeOnce", "IncludeOnce",
map[string]interface{}{},
expression, expression,
} }
} }
@ -21,7 +23,7 @@ func (n IncludeOnce) Name() string {
} }
func (n IncludeOnce) Attributes() map[string]interface{} { func (n IncludeOnce) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n IncludeOnce) Walk(v node.Visitor) { func (n IncludeOnce) Walk(v node.Visitor) {

View File

@ -5,14 +5,16 @@ import (
) )
type InstanceOf struct { type InstanceOf struct {
name string name string
expr node.Node attributes map[string]interface{}
class node.Node expr 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{
"InstanceOf", "InstanceOf",
map[string]interface{}{},
expr, expr,
class, class,
} }
@ -23,7 +25,7 @@ func (n InstanceOf) Name() string {
} }
func (n InstanceOf) Attributes() map[string]interface{} { func (n InstanceOf) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n InstanceOf) Walk(v node.Visitor) { func (n InstanceOf) Walk(v node.Visitor) {

View File

@ -5,13 +5,15 @@ import (
) )
type Isset struct { type Isset struct {
name string name string
variables []node.Node attributes map[string]interface{}
variables []node.Node
} }
func NewIsset(variables []node.Node) node.Node { func NewIsset(variables []node.Node) node.Node {
return Isset{ return Isset{
"Isset", "Isset",
map[string]interface{}{},
variables, variables,
} }
} }
@ -21,7 +23,7 @@ func (n Isset) Name() string {
} }
func (n Isset) Attributes() map[string]interface{} { func (n Isset) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Isset) Walk(v node.Visitor) { func (n Isset) Walk(v node.Visitor) {

View File

@ -5,13 +5,15 @@ import (
) )
type List struct { type List struct {
name string name string
items []node.Node attributes map[string]interface{}
items []node.Node
} }
func NewList(items []node.Node) node.Node { func NewList(items []node.Node) node.Node {
return List{ return List{
"List", "List",
map[string]interface{}{},
items, items,
} }
} }
@ -21,7 +23,7 @@ func (n List) Name() string {
} }
func (n List) Attributes() map[string]interface{} { func (n List) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n List) Walk(v node.Visitor) { func (n List) Walk(v node.Visitor) {

View File

@ -5,15 +5,17 @@ import (
) )
type MethodCall struct { type MethodCall struct {
name string name string
variable node.Node attributes map[string]interface{}
method node.Node variable node.Node
arguments []node.Node method 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{
"MethodCall", "MethodCall",
map[string]interface{}{},
variable, variable,
method, method,
arguments, arguments,
@ -25,7 +27,7 @@ func (n MethodCall) Name() string {
} }
func (n MethodCall) Attributes() map[string]interface{} { func (n MethodCall) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n MethodCall) Walk(v node.Visitor) { func (n MethodCall) Walk(v node.Visitor) {

View File

@ -5,14 +5,16 @@ import (
) )
type New struct { type New struct {
name string name string
class node.Node attributes map[string]interface{}
arguments []node.Node class 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{
"New", "New",
map[string]interface{}{},
class, class,
arguments, arguments,
} }
@ -23,7 +25,7 @@ func (n New) Name() string {
} }
func (n New) Attributes() map[string]interface{} { func (n New) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n New) Walk(v node.Visitor) { func (n New) Walk(v node.Visitor) {

View File

@ -5,13 +5,15 @@ import (
) )
type PostDec struct { type PostDec struct {
name string name string
variable node.Node attributes map[string]interface{}
variable node.Node
} }
func NewPostDec(variable node.Node) node.Node { func NewPostDec(variable node.Node) node.Node {
return PostDec{ return PostDec{
"PostDec", "PostDec",
map[string]interface{}{},
variable, variable,
} }
} }
@ -21,7 +23,7 @@ func (n PostDec) Name() string {
} }
func (n PostDec) Attributes() map[string]interface{} { func (n PostDec) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n PostDec) Walk(v node.Visitor) { func (n PostDec) Walk(v node.Visitor) {

View File

@ -5,13 +5,15 @@ import (
) )
type PostInc struct { type PostInc struct {
name string name string
variable node.Node attributes map[string]interface{}
variable node.Node
} }
func NewPostInc(variable node.Node) node.Node { func NewPostInc(variable node.Node) node.Node {
return PostInc{ return PostInc{
"PostInc", "PostInc",
map[string]interface{}{},
variable, variable,
} }
} }
@ -21,7 +23,7 @@ func (n PostInc) Name() string {
} }
func (n PostInc) Attributes() map[string]interface{} { func (n PostInc) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n PostInc) Walk(v node.Visitor) { func (n PostInc) Walk(v node.Visitor) {

View File

@ -5,13 +5,15 @@ import (
) )
type PreDec struct { type PreDec struct {
name string name string
variable node.Node attributes map[string]interface{}
variable node.Node
} }
func NewPreDec(variable node.Node) node.Node { func NewPreDec(variable node.Node) node.Node {
return PreDec{ return PreDec{
"PreDec", "PreDec",
map[string]interface{}{},
variable, variable,
} }
} }
@ -21,7 +23,7 @@ func (n PreDec) Name() string {
} }
func (n PreDec) Attributes() map[string]interface{} { func (n PreDec) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n PreDec) Walk(v node.Visitor) { func (n PreDec) Walk(v node.Visitor) {

View File

@ -5,13 +5,15 @@ import (
) )
type PreInc struct { type PreInc struct {
name string name string
variable node.Node attributes map[string]interface{}
variable node.Node
} }
func NewPreInc(variable node.Node) node.Node { func NewPreInc(variable node.Node) node.Node {
return PreInc{ return PreInc{
"PreInc", "PreInc",
map[string]interface{}{},
variable, variable,
} }
} }
@ -21,7 +23,7 @@ func (n PreInc) Name() string {
} }
func (n PreInc) Attributes() map[string]interface{} { func (n PreInc) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n PreInc) Walk(v node.Visitor) { func (n PreInc) Walk(v node.Visitor) {

View File

@ -5,13 +5,15 @@ import (
) )
type Print struct { type Print struct {
name string name string
expr node.Node attributes map[string]interface{}
expr node.Node
} }
func NewPrint(expression node.Node) node.Node { func NewPrint(expression node.Node) node.Node {
return Print{ return Print{
"Print", "Print",
map[string]interface{}{},
expression, expression,
} }
} }
@ -21,7 +23,7 @@ func (n Print) Name() string {
} }
func (n Print) Attributes() map[string]interface{} { func (n Print) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Print) Walk(v node.Visitor) { func (n Print) Walk(v node.Visitor) {

View File

@ -5,14 +5,16 @@ import (
) )
type PropertyFetch struct { type PropertyFetch struct {
name string name string
variable node.Node attributes map[string]interface{}
property node.Node variable 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{
"PropertyFetch", "PropertyFetch",
map[string]interface{}{},
variable, variable,
property, property,
} }
@ -23,7 +25,7 @@ func (n PropertyFetch) Name() string {
} }
func (n PropertyFetch) Attributes() map[string]interface{} { func (n PropertyFetch) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n PropertyFetch) Walk(v node.Visitor) { func (n PropertyFetch) Walk(v node.Visitor) {

View File

@ -5,13 +5,15 @@ import (
) )
type Require struct { type Require struct {
name string name string
expr node.Node attributes map[string]interface{}
expr node.Node
} }
func NewRequire(expression node.Node) node.Node { func NewRequire(expression node.Node) node.Node {
return Require{ return Require{
"Require", "Require",
map[string]interface{}{},
expression, expression,
} }
} }
@ -21,7 +23,7 @@ func (n Require) Name() string {
} }
func (n Require) Attributes() map[string]interface{} { func (n Require) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Require) Walk(v node.Visitor) { func (n Require) Walk(v node.Visitor) {

View File

@ -5,13 +5,15 @@ import (
) )
type RequireOnce struct { type RequireOnce struct {
name string name string
expr node.Node attributes map[string]interface{}
expr node.Node
} }
func NewRequireOnce(expression node.Node) node.Node { func NewRequireOnce(expression node.Node) node.Node {
return RequireOnce{ return RequireOnce{
"RequireOnce", "RequireOnce",
map[string]interface{}{},
expression, expression,
} }
} }
@ -21,7 +23,7 @@ func (n RequireOnce) Name() string {
} }
func (n RequireOnce) Attributes() map[string]interface{} { func (n RequireOnce) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n RequireOnce) Walk(v node.Visitor) { func (n RequireOnce) Walk(v node.Visitor) {

View File

@ -5,13 +5,15 @@ import (
) )
type ShellExec struct { type ShellExec struct {
name string name string
parts []node.Node attributes map[string]interface{}
parts []node.Node
} }
func NewShellExec(parts []node.Node) node.Node { func NewShellExec(parts []node.Node) node.Node {
return ShellExec{ return ShellExec{
"ShellExec", "ShellExec",
map[string]interface{}{},
parts, parts,
} }
} }
@ -21,7 +23,7 @@ func (n ShellExec) Name() string {
} }
func (n ShellExec) Attributes() map[string]interface{} { func (n ShellExec) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n ShellExec) Walk(v node.Visitor) { func (n ShellExec) Walk(v node.Visitor) {

View File

@ -5,13 +5,15 @@ import (
) )
type ShortArray struct { type ShortArray struct {
name string name string
items []node.Node attributes map[string]interface{}
items []node.Node
} }
func NewShortArray(items []node.Node) node.Node { func NewShortArray(items []node.Node) node.Node {
return ShortArray{ return ShortArray{
"ShortArray", "ShortArray",
map[string]interface{}{},
items, items,
} }
} }
@ -21,7 +23,7 @@ func (n ShortArray) Name() string {
} }
func (n ShortArray) Attributes() map[string]interface{} { func (n ShortArray) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n ShortArray) Walk(v node.Visitor) { func (n ShortArray) Walk(v node.Visitor) {

View File

@ -5,13 +5,15 @@ import (
) )
type ShortList struct { type ShortList struct {
name string name string
items []node.Node attributes map[string]interface{}
items []node.Node
} }
func NewShortList(items []node.Node) node.Node { func NewShortList(items []node.Node) node.Node {
return ShortList{ return ShortList{
"ShortList", "ShortList",
map[string]interface{}{},
items, items,
} }
} }
@ -21,7 +23,7 @@ func (n ShortList) Name() string {
} }
func (n ShortList) Attributes() map[string]interface{} { func (n ShortList) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n ShortList) Walk(v node.Visitor) { func (n ShortList) Walk(v node.Visitor) {

View File

@ -5,15 +5,17 @@ import (
) )
type StaticCall struct { type StaticCall struct {
name string name string
class node.Node attributes map[string]interface{}
call node.Node class node.Node
arguments []node.Node call 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{
"StaticCall", "StaticCall",
map[string]interface{}{},
class, class,
call, call,
arguments, arguments,
@ -25,7 +27,7 @@ func (n StaticCall) Name() string {
} }
func (n StaticCall) Attributes() map[string]interface{} { func (n StaticCall) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n StaticCall) Walk(v node.Visitor) { func (n StaticCall) Walk(v node.Visitor) {

View File

@ -5,14 +5,16 @@ import (
) )
type StaticPropertyFetch struct { type StaticPropertyFetch struct {
name string name string
class node.Node attributes map[string]interface{}
property node.Node class 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{
"StaticPropertyFetch", "StaticPropertyFetch",
map[string]interface{}{},
class, class,
property, property,
} }
@ -23,7 +25,7 @@ func (n StaticPropertyFetch) Name() string {
} }
func (n StaticPropertyFetch) Attributes() map[string]interface{} { func (n StaticPropertyFetch) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n StaticPropertyFetch) Walk(v node.Visitor) { func (n StaticPropertyFetch) Walk(v node.Visitor) {

View File

@ -5,15 +5,17 @@ import (
) )
type Ternary struct { type Ternary struct {
name string name string
condition node.Node attributes map[string]interface{}
ifTrue node.Node condition node.Node
ifFalse node.Node ifTrue 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{
"Ternary", "Ternary",
map[string]interface{}{},
condition, condition,
ifTrue, ifTrue,
ifFalse, ifFalse,
@ -25,7 +27,7 @@ func (n Ternary) Name() string {
} }
func (n Ternary) Attributes() map[string]interface{} { func (n Ternary) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Ternary) Walk(v node.Visitor) { func (n Ternary) Walk(v node.Visitor) {

View File

@ -5,13 +5,15 @@ import (
) )
type UnaryMinus struct { type UnaryMinus struct {
name string name string
expr node.Node attributes map[string]interface{}
expr node.Node
} }
func NewUnaryMinus(expression node.Node) node.Node { func NewUnaryMinus(expression node.Node) node.Node {
return UnaryMinus{ return UnaryMinus{
"UnaryMinus", "UnaryMinus",
map[string]interface{}{},
expression, expression,
} }
} }
@ -21,7 +23,7 @@ func (n UnaryMinus) Name() string {
} }
func (n UnaryMinus) Attributes() map[string]interface{} { func (n UnaryMinus) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n UnaryMinus) Walk(v node.Visitor) { func (n UnaryMinus) Walk(v node.Visitor) {

View File

@ -5,13 +5,15 @@ import (
) )
type UnaryPlus struct { type UnaryPlus struct {
name string name string
expr node.Node attributes map[string]interface{}
expr node.Node
} }
func NewUnaryPlus(expression node.Node) node.Node { func NewUnaryPlus(expression node.Node) node.Node {
return UnaryPlus{ return UnaryPlus{
"UnaryPlus", "UnaryPlus",
map[string]interface{}{},
expression, expression,
} }
} }
@ -21,7 +23,7 @@ func (n UnaryPlus) Name() string {
} }
func (n UnaryPlus) Attributes() map[string]interface{} { func (n UnaryPlus) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n UnaryPlus) Walk(v node.Visitor) { func (n UnaryPlus) Walk(v node.Visitor) {

View File

@ -5,13 +5,15 @@ import (
) )
type Variable struct { type Variable struct {
name string name string
varName node.Node attributes map[string]interface{}
varName node.Node
} }
func NewVariable(varName node.Node) node.Node { func NewVariable(varName node.Node) node.Node {
return Variable{ return Variable{
"Variable", "Variable",
map[string]interface{}{},
varName, varName,
} }
} }
@ -21,7 +23,7 @@ func (n Variable) Name() string {
} }
func (n Variable) Attributes() map[string]interface{} { func (n Variable) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Variable) Walk(v node.Visitor) { func (n Variable) Walk(v node.Visitor) {

View File

@ -5,14 +5,16 @@ import (
) )
type Yield struct { type Yield struct {
name string name string
key node.Node attributes map[string]interface{}
value node.Node key 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{
"Yield", "Yield",
map[string]interface{}{},
key, key,
value, value,
} }
@ -23,7 +25,7 @@ func (n Yield) Name() string {
} }
func (n Yield) Attributes() map[string]interface{} { func (n Yield) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Yield) Walk(v node.Visitor) { func (n Yield) Walk(v node.Visitor) {

View File

@ -5,13 +5,15 @@ import (
) )
type YieldFrom struct { type YieldFrom struct {
name string name string
expr node.Node attributes map[string]interface{}
expr node.Node
} }
func NewYieldFrom(expression node.Node) node.Node { func NewYieldFrom(expression node.Node) node.Node {
return YieldFrom{ return YieldFrom{
"YieldFrom", "YieldFrom",
map[string]interface{}{},
expression, expression,
} }
} }
@ -21,7 +23,7 @@ func (n YieldFrom) Name() string {
} }
func (n YieldFrom) Attributes() map[string]interface{} { func (n YieldFrom) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n YieldFrom) Walk(v node.Visitor) { func (n YieldFrom) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewFullyQualified(parts []node.Node) node.Node {
return FullyQualified{ return FullyQualified{
NameNode{ NameNode{
"FullyQualifiedName", "FullyQualifiedName",
map[string]interface{}{},
parts, parts,
}, },
} }
@ -22,5 +23,5 @@ func (n FullyQualified) Name() string {
} }
func (n FullyQualified) Attributes() map[string]interface{} { func (n FullyQualified) Attributes() map[string]interface{} {
return nil return n.attributes
} }

View File

@ -5,13 +5,15 @@ import (
) )
type NameNode struct { type NameNode struct {
name string name string
parts []node.Node attributes map[string]interface{}
parts []node.Node
} }
func NewName(parts []node.Node) node.Node { func NewName(parts []node.Node) node.Node {
return NameNode{ return NameNode{
"Name", "Name",
map[string]interface{}{},
parts, parts,
} }
} }
@ -21,7 +23,7 @@ func (n NameNode) Name() string {
} }
func (n NameNode) Attributes() map[string]interface{} { func (n NameNode) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n NameNode) Walk(v node.Visitor) { func (n NameNode) Walk(v node.Visitor) {

View File

@ -12,6 +12,7 @@ func NewRelative(parts []node.Node) node.Node {
return Relative{ return Relative{
NameNode{ NameNode{
"RelativeName", "RelativeName",
map[string]interface{}{},
parts, parts,
}, },
} }
@ -22,5 +23,5 @@ func (n Relative) Name() string {
} }
func (n Relative) Attributes() map[string]interface{} { func (n Relative) Attributes() map[string]interface{} {
return nil return n.attributes
} }

View File

@ -1,13 +1,15 @@
package node package node
type Nullable struct { type Nullable struct {
name string name string
expr Node attributes map[string]interface{}
expr Node
} }
func NewNullable(expression Node) Node { func NewNullable(expression Node) Node {
return Nullable{ return Nullable{
"Nullable", "Nullable",
map[string]interface{}{},
expression, expression,
} }
} }
@ -17,7 +19,7 @@ func (n Nullable) Name() string {
} }
func (n Nullable) Attributes() map[string]interface{} { func (n Nullable) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Nullable) Walk(v Visitor) { func (n Nullable) Walk(v Visitor) {

View File

@ -23,7 +23,7 @@ func (n Dnumber) Name() string {
} }
func (n Dnumber) Attributes() map[string]interface{} { func (n Dnumber) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Dnumber) Walk(v node.Visitor) { func (n Dnumber) Walk(v node.Visitor) {

View File

@ -5,13 +5,15 @@ import (
) )
type Encapsed struct { type Encapsed struct {
name string name string
parts []node.Node attributes map[string]interface{}
parts []node.Node
} }
func NewEncapsed(parts []node.Node) node.Node { func NewEncapsed(parts []node.Node) node.Node {
return Encapsed{ return Encapsed{
"Encapsed", "Encapsed",
map[string]interface{}{},
parts, parts,
} }
} }
@ -21,7 +23,7 @@ func (n Encapsed) Name() string {
} }
func (n Encapsed) Attributes() map[string]interface{} { func (n Encapsed) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n Encapsed) Walk(v node.Visitor) { func (n Encapsed) Walk(v node.Visitor) {

View File

@ -23,7 +23,7 @@ func (n EncapsedStringPart) Name() string {
} }
func (n EncapsedStringPart) Attributes() map[string]interface{} { func (n EncapsedStringPart) Attributes() map[string]interface{} {
return nil return n.attributes
} }
func (n EncapsedStringPart) Walk(v node.Visitor) { func (n EncapsedStringPart) Walk(v node.Visitor) {

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