Next returns a pointer to the next node, or nil if there is no next node.
()
| 72 | |
| 73 | // Next returns a pointer to the next node, or nil if there is no next node. |
| 74 | func (n *Node) Next() *Node { |
| 75 | if n.next == 0 { |
| 76 | return nil |
| 77 | } |
| 78 | return &n.parser.nodes[n.next-1] |
| 79 | } |
| 80 | |
| 81 | // Child returns a pointer to the first child node of this node. Other children |
| 82 | // can be accessed calling Next on the first child. Returns nil if there is no |
no outgoing calls