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