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