(data string, typ NodeType)
| 556 | } |
| 557 | |
| 558 | func (n *TNode) createChildNode(data string, typ NodeType) *TNode { |
| 559 | m := createNode(data, typ) |
| 560 | m.Parent = n |
| 561 | if n.FirstChild == nil { |
| 562 | n.FirstChild = m |
| 563 | } else { |
| 564 | n.LastChild.NextSibling = m |
| 565 | m.PrevSibling = n.LastChild |
| 566 | } |
| 567 | n.LastChild = m |
| 568 | return m |
| 569 | } |
| 570 | |
| 571 | func (n *TNode) appendNode(data string, typ NodeType) *TNode { |
| 572 | m := createNode(data, typ) |
no test coverage detected