pathparser

package
v0.40.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustCompile

func MustCompile(path string) (*regexp.Regexp, bool)

Turn path pattern into a regular expression

func Pretty

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

func Size

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

Types

type Node

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

type Path

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

func (*Path) Literal added in v0.34.0

func (p *Path) Literal() bool

func (*Path) Result

func (p *Path) Result() (string, bool)

type Peg

type Peg struct {
	Path

	Buffer string

	Pretty bool
	// contains filtered or unexported fields
}

func (*Peg) AST

func (t *Peg) AST() *node32

func (*Peg) Add

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

func (*Peg) Execute

func (p *Peg) Execute()

func (*Peg) Init

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

func (*Peg) Parse

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

func (*Peg) PrettyPrintSyntaxTree

func (t *Peg) PrettyPrintSyntaxTree(buffer string)

func (*Peg) Print

func (t *Peg) Print()

func (*Peg) PrintSyntaxTree

func (p *Peg) PrintSyntaxTree()

func (*Peg) Reset

func (p *Peg) Reset()

func (*Peg) SprintSyntaxTree

func (p *Peg) SprintSyntaxTree() string

func (*Peg) Tokens

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

func (*Peg) Trim

func (t *Peg) Trim(length uint32)

func (*Peg) WriteSyntaxTree

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

Jump to

Keyboard shortcuts

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