Documentation
¶
Index ¶
Constants ¶
View Source
const ( ERROR_READING = "Reading Error" ERROR_SYNTAX = "Syntax Error" ERROR_INTERNAL = "Internal Error" ERROR_FORMATTING = "Formatting Error" )
Variables ¶
View Source
var EOF = &ParsingError{Name: "EOF"}
Functions ¶
This section is empty.
Types ¶
type CommentNode ¶
type CommentNode struct {
Contents string
}
Can be used for documentation
func (*CommentNode) Node ¶
func (node *CommentNode) Node() string
type DirectiveNode ¶
type DirectiveNode struct {
Name string
NodeArgs
NodeChildren
}
func (*DirectiveNode) Node ¶
func (node *DirectiveNode) Node() string
type LiteralNode ¶
type LiteralNode struct {
Contents string
}
A literal string does not get modified in any way.
func (*LiteralNode) Node ¶
func (node *LiteralNode) Node() string
type NodeChildren ¶
type NodeChildren []Node
type NodeTree ¶
type NodeTree struct {
Tomes map[string]Node
NodeChildren
}
type Parser ¶
type Parser struct {
Name string
// contains filtered or unexported fields
}
func (*Parser) Parse ¶
func (parser *Parser) Parse() (*NodeTree, *ParsingError)
type ParsingError ¶
func (*ParsingError) BeautyPrint ¶
func (err *ParsingError) BeautyPrint(writer io.Writer)
func (*ParsingError) Error ¶
func (err *ParsingError) Error() string
func (*ParsingError) GetBeautyPrinted ¶
func (err *ParsingError) GetBeautyPrinted() string
type StringFormatter ¶
type StringFormatter struct {
// contains filtered or unexported fields
}
func NewStringFormatter ¶
func NewStringFormatter(reader *bufio.Reader) *StringFormatter
func (*StringFormatter) Format ¶
func (formatter *StringFormatter) Format() ([]Segment, *ParsingError)
type StringModifier ¶
func GetModifier ¶
func GetModifier(name string, args []string) StringModifier
type StringNode ¶
type StringNode struct {
Contents string
}
A string that can have variable expansions inside. Uses backticks (`) instead of quotes.
func (*StringNode) Node ¶
func (node *StringNode) Node() string
type VariableSegment ¶
type VariableSegment struct {
Name string
Modifier StringModifier
IsOptional bool
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.