Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block []Node
Block is the top most unit in a TextML document, it's an alias to a slice of [Node]s for easy construction.
func Compile ¶
Compile a *parser.Block into a Block instance (for now just strips token information).
func (Block) FirstElement ¶
func (b Block) FirstElement() *ElementNode
FirstElement returns the first ast.ElementNode in this block or nil otherwise.
func (Block) TextContent ¶
TextContent concatenates all ast.TextNode text in this block (for now [ast.ElementNode]s are skipped)
type ElementNode ¶
ElementNode represents an element node with its block arguments
func (*ElementNode) MarshalJSON ¶
func (n *ElementNode) MarshalJSON() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.