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 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

View File

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

View File

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