Documentation ¶
Index ¶
- func Compile(code string, compact, removeUnused bool) ([]byte, []error)
- func CompileToTree(code string) (*ast.Tree, []error)
- func Pretty(pretty bool) func(*Parser) error
- func Size(size int) func(*Parser) error
- type Compaction
- type Parser
- func (t *Parser) AST() *node32
- func (t *Parser) Add(rule pegRule, begin, end, index uint32)
- func (p *Parser) Init(options ...func(*Parser) error) error
- func (p *Parser) Parse(rule ...int) error
- func (t *Parser) PrettyPrintSyntaxTree(buffer string)
- func (t *Parser) Print()
- func (p *Parser) PrintSyntaxTree()
- func (p *Parser) Reset()
- func (p *Parser) SprintSyntaxTree() string
- func (t *Parser) Tokens() []token32
- func (t *Parser) Trim(length uint32)
- func (p *Parser) WriteSyntaxTree(w io.Writer)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Compaction ¶
type Compaction struct {
// contains filtered or unexported fields
}
func NewCompaction ¶
func NewCompaction(tree *ast.Tree) Compaction
func (*Compaction) Compact ¶
func (c *Compaction) Compact()
type Parser ¶
func (*Parser) PrettyPrintSyntaxTree ¶
func (t *Parser) PrettyPrintSyntaxTree(buffer string)
func (*Parser) PrintSyntaxTree ¶
func (p *Parser) PrintSyntaxTree()
func (*Parser) SprintSyntaxTree ¶
func (*Parser) WriteSyntaxTree ¶
Click to show internal directories.
Click to hide internal directories.