mirror of
https://github.com/usememos/memos.git
synced 2024-11-17 20:25:46 +08:00
88799d469c
chore: initial gomark folder
12 lines
179 B
Go
12 lines
179 B
Go
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)
|
|
}
|