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

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

View File

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

View File

@@ -32,6 +32,14 @@ func (n AltIf) Attributes() map[string]interface{} {
return n.attributes
}
func (n AltIf) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n AltIf) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n AltIf) AddElseIf(elseIf node.Node) node.Node {
if n.elseIf == nil {
n.elseIf = make([]node.Node, 0)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -30,6 +30,14 @@ func (n GroupUse) Attributes() map[string]interface{} {
return n.attributes
}
func (n GroupUse) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n GroupUse) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n GroupUse) SetUseType(useType node.Node) node.Node {
n.useType = useType
return n

View File

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

View File

@@ -32,6 +32,14 @@ func (n If) Attributes() map[string]interface{} {
return n.attributes
}
func (n If) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n If) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n If) AddElseIf(elseIf node.Node) node.Node {
if n.elseIf == nil {
n.elseIf = make([]node.Node, 0)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -30,6 +30,14 @@ func (n Use) Attributes() map[string]interface{} {
return n.attributes
}
func (n Use) Attribute(key string) interface{} {
return n.attributes[key]
}
func (n Use) SetAttribute(key string, value interface{}) {
n.attributes[key] = value
}
func (n Use) SetUseType(useType node.Node) node.Node {
n.useType = useType
return n

View File

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

View File

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