attributer interface
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user