parse

package
v0.1.36 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: MIT Imports: 3 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Func

type Func func(*Parser) bool

func AtLeastOne

func AtLeastOne(f Func) Func

func CI

func CI(s string) Func

func Delimited

func Delimited(
	term Func, delimiter Func) Func

func End

func End() Func

func Exact

func Exact(s string) Func

func Multiple

func Multiple(f Func) Func

func OneOf

func OneOf(fns ...func(*Parser) bool) Func

func Optional

func Optional(f Func) Func

func RE

func RE(re *regexp.Regexp, submatchcb func([]string) bool) Func

func SeqWS

func SeqWS(fns ...Func) Func

func (Func) Action

func (m Func) Action(then func()) Func

func (Func) Or

func (m Func) Or(other Func) Func

type Parser

type Parser struct {
	Remaining  string
	LastReject string
}

func (*Parser) CI

func (b *Parser) CI(prefix string) bool

func (*Parser) Copy

func (b *Parser) Copy() *Parser

func (*Parser) Exact

func (b *Parser) Exact(prefix string) bool

func (*Parser) Match

func (b *Parser) Match(f func(*Parser) bool) bool

func (*Parser) SkipWS

func (b *Parser) SkipWS() bool

func (*Parser) String

func (b *Parser) String() string

Jump to

Keyboard shortcuts

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