memos/plugin/gomark/ast/node.go

13 lines
179 B
Go
Raw Normal View History

package ast
func NewNode(tp, text string) *Node {
return &Node{
Type: tp,
Text: text,
}
}
func (n *Node) AddChild(child *Node) {
n.Children = append(n.Children, child)
}