attributer interface

This commit is contained in:
z7zmey 2017-12-31 11:57:55 +02:00
parent 6bc2b20c90
commit 8edc05c8d5
153 changed files with 1229 additions and 7 deletions

View File

@ -1,10 +1,10 @@
package node
type Argument struct {
name string
arguments map[string]interface{}
expr Node
variadic bool
name string
attributes map[string]interface{}
expr Node
variadic bool
}
func NewArgument(expression Node, variadic bool) Node {
@ -23,7 +23,15 @@ func (n Argument) Name() string {
}
func (n Argument) Attributes() map[string]interface{} {
return n.arguments
return n.attributes
}
func (n Argument) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Argument) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Argument) Walk(v Visitor) {

View File

@ -26,6 +26,14 @@ func (n Array) Attributes() map[string]interface{} {
return n.attributes
}
func (n Array) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Array) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Array) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -28,6 +28,14 @@ func (n ArrayDimFetch) Attributes() map[string]interface{} {
return n.attributes
}
func (n ArrayDimFetch) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n ArrayDimFetch) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n ArrayDimFetch) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -30,6 +30,14 @@ func (n ArrayItem) Attributes() map[string]interface{} {
return n.attributes
}
func (n ArrayItem) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n ArrayItem) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n ArrayItem) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n Assign) Attributes() map[string]interface{} {
return n.attributes
}
func (n Assign) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Assign) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Assign) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n AssignRef) Attributes() map[string]interface{} {
return n.attributes
}
func (n AssignRef) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n AssignRef) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n AssignRef) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n BitwiseAnd) Attributes() map[string]interface{} {
return n.attributes
}
func (n BitwiseAnd) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n BitwiseAnd) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n BitwiseAnd) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n BitwiseOr) Attributes() map[string]interface{} {
return n.attributes
}
func (n BitwiseOr) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n BitwiseOr) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n BitwiseOr) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -23,6 +23,14 @@ func (n BitwiseXor) Attributes() map[string]interface{} {
return n.attributes
}
func (n BitwiseXor) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n BitwiseXor) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n BitwiseXor) Name() string {
return "BitwiseXor"
}

View File

@ -27,6 +27,14 @@ func (n Concat) Attributes() map[string]interface{} {
return n.attributes
}
func (n Concat) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Concat) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Concat) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n Div) Attributes() map[string]interface{} {
return n.attributes
}
func (n Div) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Div) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Div) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n Minus) Attributes() map[string]interface{} {
return n.attributes
}
func (n Minus) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Minus) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Minus) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n Mod) Attributes() map[string]interface{} {
return n.attributes
}
func (n Mod) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Mod) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Mod) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n Mul) Attributes() map[string]interface{} {
return n.attributes
}
func (n Mul) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Mul) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Mul) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n Plus) Attributes() map[string]interface{} {
return n.attributes
}
func (n Plus) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Plus) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Plus) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n Pow) Attributes() map[string]interface{} {
return n.attributes
}
func (n Pow) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Pow) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Pow) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n ShiftLeft) Attributes() map[string]interface{} {
return n.attributes
}
func (n ShiftLeft) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n ShiftLeft) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n ShiftLeft) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n ShiftRight) Attributes() map[string]interface{} {
return n.attributes
}
func (n ShiftRight) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n ShiftRight) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n ShiftRight) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n BitwiseAnd) Attributes() map[string]interface{} {
return n.attributes
}
func (n BitwiseAnd) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n BitwiseAnd) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n BitwiseAnd) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -23,6 +23,14 @@ func (n BitwiseOr) Attributes() map[string]interface{} {
return n.attributes
}
func (n BitwiseOr) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n BitwiseOr) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n BitwiseOr) Name() string {
return "BitwiseOr"
}

View File

@ -23,6 +23,14 @@ func (n BitwiseXor) Attributes() map[string]interface{} {
return n.attributes
}
func (n BitwiseXor) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n BitwiseXor) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n BitwiseXor) Name() string {
return "BitwiseXor"
}

View File

@ -27,6 +27,14 @@ func (n BooleanAnd) Attributes() map[string]interface{} {
return n.attributes
}
func (n BooleanAnd) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n BooleanAnd) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n BooleanAnd) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n BooleanOr) Attributes() map[string]interface{} {
return n.attributes
}
func (n BooleanOr) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n BooleanOr) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n BooleanOr) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n Coalesce) Attributes() map[string]interface{} {
return n.attributes
}
func (n Coalesce) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Coalesce) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Coalesce) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n Concat) Attributes() map[string]interface{} {
return n.attributes
}
func (n Concat) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Concat) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Concat) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n Div) Attributes() map[string]interface{} {
return n.attributes
}
func (n Div) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Div) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Div) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n Equal) Attributes() map[string]interface{} {
return n.attributes
}
func (n Equal) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Equal) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Equal) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n Greater) Attributes() map[string]interface{} {
return n.attributes
}
func (n Greater) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Greater) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Greater) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n GreaterOrEqual) Attributes() map[string]interface{} {
return n.attributes
}
func (n GreaterOrEqual) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n GreaterOrEqual) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n GreaterOrEqual) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n Identical) Attributes() map[string]interface{} {
return n.attributes
}
func (n Identical) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Identical) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Identical) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n LogicalAnd) Attributes() map[string]interface{} {
return n.attributes
}
func (n LogicalAnd) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n LogicalAnd) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n LogicalAnd) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n LogicalOr) Attributes() map[string]interface{} {
return n.attributes
}
func (n LogicalOr) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n LogicalOr) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n LogicalOr) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n LogicalXor) Attributes() map[string]interface{} {
return n.attributes
}
func (n LogicalXor) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n LogicalXor) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n LogicalXor) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n Minus) Attributes() map[string]interface{} {
return n.attributes
}
func (n Minus) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Minus) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Minus) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n Mod) Attributes() map[string]interface{} {
return n.attributes
}
func (n Mod) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Mod) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Mod) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n Mul) Attributes() map[string]interface{} {
return n.attributes
}
func (n Mul) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Mul) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Mul) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n NotEqual) Attributes() map[string]interface{} {
return n.attributes
}
func (n NotEqual) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n NotEqual) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n NotEqual) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n NotIdentical) Attributes() map[string]interface{} {
return n.attributes
}
func (n NotIdentical) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n NotIdentical) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n NotIdentical) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n Plus) Attributes() map[string]interface{} {
return n.attributes
}
func (n Plus) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Plus) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Plus) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n Pow) Attributes() map[string]interface{} {
return n.attributes
}
func (n Pow) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Pow) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Pow) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n ShiftLeft) Attributes() map[string]interface{} {
return n.attributes
}
func (n ShiftLeft) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n ShiftLeft) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n ShiftLeft) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n ShiftRight) Attributes() map[string]interface{} {
return n.attributes
}
func (n ShiftRight) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n ShiftRight) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n ShiftRight) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n Smaller) Attributes() map[string]interface{} {
return n.attributes
}
func (n Smaller) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Smaller) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Smaller) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n SmallerOrEqual) Attributes() map[string]interface{} {
return n.attributes
}
func (n SmallerOrEqual) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n SmallerOrEqual) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n SmallerOrEqual) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -27,6 +27,14 @@ func (n Spaceship) Attributes() map[string]interface{} {
return n.attributes
}
func (n Spaceship) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Spaceship) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Spaceship) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n BitwiseNot) Attributes() map[string]interface{} {
return n.attributes
}
func (n BitwiseNot) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n BitwiseNot) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n BitwiseNot) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n BooleanNot) Attributes() map[string]interface{} {
return n.attributes
}
func (n BooleanNot) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n BooleanNot) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n BooleanNot) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n CastArray) Attributes() map[string]interface{} {
return n.attributes
}
func (n CastArray) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n CastArray) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n CastArray) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n CastBool) Attributes() map[string]interface{} {
return n.attributes
}
func (n CastBool) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n CastBool) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n CastBool) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n CastDouble) Attributes() map[string]interface{} {
return n.attributes
}
func (n CastDouble) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n CastDouble) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n CastDouble) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n CastInt) Attributes() map[string]interface{} {
return n.attributes
}
func (n CastInt) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n CastInt) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n CastInt) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n CastObject) Attributes() map[string]interface{} {
return n.attributes
}
func (n CastObject) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n CastObject) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n CastObject) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n CastString) Attributes() map[string]interface{} {
return n.attributes
}
func (n CastString) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n CastString) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n CastString) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n CastUnset) Attributes() map[string]interface{} {
return n.attributes
}
func (n CastUnset) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n CastUnset) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n CastUnset) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -8,6 +8,14 @@ func (n ClassConstFetch) Attributes() map[string]interface{} {
return n.attributes
}
func (n ClassConstFetch) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n ClassConstFetch) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n ClassConstFetch) Name() string {
return "ClassConstFetch"
}

View File

@ -26,6 +26,14 @@ func (n Clone) Attributes() map[string]interface{} {
return n.attributes
}
func (n Clone) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Clone) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Clone) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -35,6 +35,14 @@ func (n Closure) Attributes() map[string]interface{} {
return n.attributes
}
func (n Closure) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Closure) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Closure) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -28,6 +28,14 @@ func (n ClusureUse) Attributes() map[string]interface{} {
return n.attributes
}
func (n ClusureUse) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n ClusureUse) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n ClusureUse) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n ConstFetch) Attributes() map[string]interface{} {
return n.attributes
}
func (n ConstFetch) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n ConstFetch) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n ConstFetch) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n Empty) Attributes() map[string]interface{} {
return n.attributes
}
func (n Empty) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Empty) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Empty) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n ErrorSuppress) Attributes() map[string]interface{} {
return n.attributes
}
func (n ErrorSuppress) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n ErrorSuppress) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n ErrorSuppress) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n Eval) Attributes() map[string]interface{} {
return n.attributes
}
func (n Eval) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Eval) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Eval) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -28,6 +28,14 @@ func (n Exit) Attributes() map[string]interface{} {
return n.attributes
}
func (n Exit) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Exit) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Exit) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -28,6 +28,14 @@ func (n FunctionCall) Attributes() map[string]interface{} {
return n.attributes
}
func (n FunctionCall) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n FunctionCall) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n FunctionCall) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n Include) Attributes() map[string]interface{} {
return n.attributes
}
func (n Include) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Include) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Include) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n IncludeOnce) Attributes() map[string]interface{} {
return n.attributes
}
func (n IncludeOnce) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n IncludeOnce) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n IncludeOnce) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -28,6 +28,14 @@ func (n InstanceOf) Attributes() map[string]interface{} {
return n.attributes
}
func (n InstanceOf) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n InstanceOf) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n InstanceOf) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n Isset) Attributes() map[string]interface{} {
return n.attributes
}
func (n Isset) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Isset) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Isset) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n List) Attributes() map[string]interface{} {
return n.attributes
}
func (n List) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n List) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n List) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -30,6 +30,14 @@ func (n MethodCall) Attributes() map[string]interface{} {
return n.attributes
}
func (n MethodCall) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n MethodCall) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n MethodCall) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -28,6 +28,14 @@ func (n New) Attributes() map[string]interface{} {
return n.attributes
}
func (n New) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n New) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n New) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n PostDec) Attributes() map[string]interface{} {
return n.attributes
}
func (n PostDec) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n PostDec) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n PostDec) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n PostInc) Attributes() map[string]interface{} {
return n.attributes
}
func (n PostInc) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n PostInc) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n PostInc) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n PreDec) Attributes() map[string]interface{} {
return n.attributes
}
func (n PreDec) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n PreDec) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n PreDec) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n PreInc) Attributes() map[string]interface{} {
return n.attributes
}
func (n PreInc) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n PreInc) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n PreInc) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n Print) Attributes() map[string]interface{} {
return n.attributes
}
func (n Print) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Print) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Print) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -28,6 +28,14 @@ func (n PropertyFetch) Attributes() map[string]interface{} {
return n.attributes
}
func (n PropertyFetch) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n PropertyFetch) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n PropertyFetch) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n Require) Attributes() map[string]interface{} {
return n.attributes
}
func (n Require) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Require) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Require) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n RequireOnce) Attributes() map[string]interface{} {
return n.attributes
}
func (n RequireOnce) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n RequireOnce) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n RequireOnce) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n ShellExec) Attributes() map[string]interface{} {
return n.attributes
}
func (n ShellExec) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n ShellExec) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n ShellExec) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n ShortArray) Attributes() map[string]interface{} {
return n.attributes
}
func (n ShortArray) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n ShortArray) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n ShortArray) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n ShortList) Attributes() map[string]interface{} {
return n.attributes
}
func (n ShortList) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n ShortList) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n ShortList) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -30,6 +30,14 @@ func (n StaticCall) Attributes() map[string]interface{} {
return n.attributes
}
func (n StaticCall) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n StaticCall) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n StaticCall) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -28,6 +28,14 @@ func (n StaticPropertyFetch) Attributes() map[string]interface{} {
return n.attributes
}
func (n StaticPropertyFetch) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n StaticPropertyFetch) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n StaticPropertyFetch) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -30,6 +30,14 @@ func (n Ternary) Attributes() map[string]interface{} {
return n.attributes
}
func (n Ternary) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Ternary) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Ternary) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n UnaryMinus) Attributes() map[string]interface{} {
return n.attributes
}
func (n UnaryMinus) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n UnaryMinus) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n UnaryMinus) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n UnaryPlus) Attributes() map[string]interface{} {
return n.attributes
}
func (n UnaryPlus) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n UnaryPlus) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n UnaryPlus) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n Variable) Attributes() map[string]interface{} {
return n.attributes
}
func (n Variable) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Variable) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Variable) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -28,6 +28,14 @@ func (n Yield) Attributes() map[string]interface{} {
return n.attributes
}
func (n Yield) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Yield) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Yield) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n YieldFrom) Attributes() map[string]interface{} {
return n.attributes
}
func (n YieldFrom) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n YieldFrom) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n YieldFrom) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n Identifier) Attributes() map[string]interface{} {
return n.attributes
}
func (n Identifier) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Identifier) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Identifier) Walk(v Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n NameNode) Attributes() map[string]interface{} {
return n.attributes
}
func (n NameNode) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n NameNode) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n NameNode) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n NamePart) Attributes() map[string]interface{} {
return n.attributes
}
func (n NamePart) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n NamePart) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n NamePart) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -1,7 +1,13 @@
package node
type Node interface {
Name() string
type Attributer interface {
Attributes() map[string]interface{}
Attribute(key string) interface{}
SetAttribute(key string, value interface{})
}
type Node interface {
Attributer
Name() string
Walk(v Visitor)
}

View File

@ -22,6 +22,14 @@ func (n Nullable) Attributes() map[string]interface{} {
return n.attributes
}
func (n Nullable) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Nullable) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Nullable) Walk(v Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -29,6 +29,14 @@ func (n Parameter) Attributes() map[string]interface{} {
return n.attributes
}
func (n Parameter) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Parameter) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Parameter) Walk(v Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n Dnumber) Attributes() map[string]interface{} {
return n.attributes
}
func (n Dnumber) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Dnumber) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Dnumber) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n Encapsed) Attributes() map[string]interface{} {
return n.attributes
}
func (n Encapsed) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Encapsed) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Encapsed) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n EncapsedStringPart) Attributes() map[string]interface{} {
return n.attributes
}
func (n EncapsedStringPart) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n EncapsedStringPart) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n EncapsedStringPart) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

View File

@ -26,6 +26,14 @@ func (n Lnumber) Attributes() map[string]interface{} {
return n.attributes
}
func (n Lnumber) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Lnumber) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Lnumber) Walk(v node.Visitor) {
if v.EnterNode(n) == false {
return

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