Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct {
Log *log.Logger // Log is used to print warnings during parsing.
ReadFile func(filename string) ([]byte, error) // ReadFile is used to read e.g. #+INCLUDE files.
}
func New ¶
func New() *Configuration
New returns a new Configuration with (hopefully) sane defaults.
func (*Configuration) Parse ¶
Parse parses the input into an AST (and some other helpful fields like Outline). To allow method chaining, errors are stored in document.Error rather than being returned.
func (*Configuration) Silent ¶
func (c *Configuration) Silent() *Configuration
Silent disables all logging of warnings during parsing.
type Document ¶
type Document struct {
*Configuration
Path string // Path of the file containing the parse input - used to resolve relative paths during parsing (e.g. INCLUDE).
Nodes []Node
NamedNodes map[string]Node
Options Options
Error error
// contains filtered or unexported fields
}
Document contains the parsing results and a pointer to the Configuration.
type Heading ¶
type Node ¶
type Node interface {
String() string // String returns the pretty printed Org mode string for the node (see OrgWriter).
// contains filtered or unexported methods
}
Node represents a parsed node of the document.