mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
19
plugin/gomark/ast/ast.go
Normal file
19
plugin/gomark/ast/ast.go
Normal file
@ -0,0 +1,19 @@
|
||||
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)
|
||||
}
|
Reference in New Issue
Block a user