GetAnnotation retrieves the annotation associated with this node.
(ann *Annotations)
| 24 | |
| 25 | // GetAnnotation retrieves the annotation associated with this node. |
| 26 | func (n AnnotatedNode) GetAnnotation(ann *Annotations) interface{} { |
| 27 | if n.AnnIdx == NoAnnotation { |
| 28 | return nil |
| 29 | } |
| 30 | return ann.Get(n.AnnIdx) |
| 31 | } |
| 32 | |
| 33 | // SetAnnotation sets the annotation associated with this node. |
| 34 | func (n AnnotatedNode) SetAnnotation(ann *Annotations, annotation interface{}) { |