preparser

package
v1.11.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pretty

func Pretty(pretty bool) func(*PreParser) error

func Size

func Size(size int) func(*PreParser) error

Types

type PreParser

type PreParser struct {
	PreString
	Buffer string

	Pretty bool
	// contains filtered or unexported fields
}

func New

func New() *PreParser

func (*PreParser) AST

func (t *PreParser) AST() *node32

func (*PreParser) Add

func (t *PreParser) Add(rule pegRule, begin, end, index uint32)

func (*PreParser) Debug

func (ppr *PreParser) Debug(q string) error

Debug takes a string, parses it, and prints its AST.

func (*PreParser) Execute

func (p *PreParser) Execute()

func (*PreParser) Init

func (p *PreParser) Init(options ...func(*PreParser) error) error

func (*PreParser) NewString

func (ppr *PreParser) NewString(s string)

ParseString returns index of the Tail

func (*PreParser) Parse

func (p *PreParser) Parse(rule ...int) error

func (*PreParser) PrettyPrintSyntaxTree

func (t *PreParser) PrettyPrintSyntaxTree(buffer string)

func (*PreParser) Print

func (t *PreParser) Print()

func (*PreParser) PrintSyntaxTree

func (p *PreParser) PrintSyntaxTree()

func (*PreParser) Reset

func (p *PreParser) Reset()

func (*PreParser) SprintSyntaxTree

func (p *PreParser) SprintSyntaxTree() string

func (*PreParser) TailIndex

func (ppr *PreParser) TailIndex(s string) int

func (*PreParser) Tokens

func (t *PreParser) Tokens() []token32

func (*PreParser) Trim

func (t *PreParser) Trim(length uint32)

func (*PreParser) WriteSyntaxTree

func (p *PreParser) WriteSyntaxTree(w io.Writer)

type PreString

type PreString struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL