mirror of
https://github.com/usememos/memos.git
synced 2025-03-14 14:33:20 +08:00
19 lines
258 B
Go
19 lines
258 B
Go
package ast
|
|
|
|
type Node struct {
|
|
Type string
|
|
Text string
|
|
Children []*Node
|
|
}
|
|
|
|
type Document struct {
|
|
Nodes []*Node
|
|
}
|
|
|
|
func NewDocument() *Document {
|
|
return &Document{}
|
|
}
|
|
|
|
func (d *Document) AddNode(node *Node) {
|
|
d.Nodes = append(d.Nodes, node)
|
|
}
|