preparser

package
v1.15.2 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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