Documentation
¶
Index ¶
- Variables
- type Error
- type Pair
- type ParseFn
- func Between[T any, S any, U any](opening ParseFn[T], p ParseFn[S], closing ParseFn[U]) ParseFn[S]
- func Choice[T any](ps ...ParseFn[T]) ParseFn[T]
- func Compose[T any, S any](p1 ParseFn[T], p2 ParseFn[S]) ParseFn[Pair[T, S]]
- func Concat[T any](p ParseFn[Pair[[]T, []T]]) ParseFn[[]T]
- func Cons[T any](left ParseFn[T], right ParseFn[[]T]) ParseFn[[]T]
- func Count[T any](p ParseFn[T], count int) ParseFn[[]T]
- func DiscardLeft[T any, S any](p1 ParseFn[T], p2 ParseFn[S]) ParseFn[S]
- func DiscardMiddle[T any, S any, U any](opening ParseFn[T], p ParseFn[S], closing ParseFn[U]) ParseFn[Pair[T, U]]
- func DiscardRight[T any, S any](p1 ParseFn[T], p2 ParseFn[S]) ParseFn[T]
- func ForwardRef[T any](fn func() ParseFn[T]) ParseFn[T]
- func Left[T any, S any](p ParseFn[Pair[T, S]]) ParseFn[T]
- func Many[T any](p ParseFn[T]) ParseFn[[]T]
- func Many1[T any](p ParseFn[T]) ParseFn[[]T]
- func Map[T any, R any](p ParseFn[T], fn func(T) R) ParseFn[R]
- func Map2[T any, S any, R any](p1 ParseFn[T], p2 ParseFn[S], fn func(T, S) R) ParseFn[R]
- func Map3[T any, S any, U any, R any](p1 ParseFn[T], p2 ParseFn[S], p3 ParseFn[U], fn func(T, S, U) R) ParseFn[R]
- func Map4[T any, S any, U any, V any, R any](p1 ParseFn[T], p2 ParseFn[S], p3 ParseFn[U], p4 ParseFn[V], ...) ParseFn[R]
- func MapError[T any](p ParseFn[T], fn func(*Error, State) *Error) ParseFn[T]
- func MapErrorValue[T any](p ParseFn[T], error *Error) ParseFn[T]
- func MapPair[T any, S any, R any](p ParseFn[Pair[T, S]], fn func(T, S) R) ParseFn[R]
- func MapValue[T any, R any](p ParseFn[T], value R) ParseFn[R]
- func Memoize[T any](p ParseFn[T]) ParseFn[T]
- func NoneOfChar(chars string) ParseFn[rune]
- func OneOfChar(chars string) ParseFn[rune]
- func OneOrZero[T any](p ParseFn[T]) ParseFn[T]
- func Pointer[T any](p ParseFn[T]) ParseFn[*T]
- func Reduce[T any](fn ReduceFn[T], ps ...ParseFn[T]) ParseFn[T]
- func Right[T any, S any](p ParseFn[Pair[T, S]]) ParseFn[S]
- func SatisfyChar(fn func(rune rune) bool) ParseFn[rune]
- func StringFromRunes(p ParseFn[[]rune]) ParseFn[string]
- func Token(word string) ParseFn[string]
- func Whitespace() ParseFn[rune]
- func Word(chars string) ParseFn[string]
- type ReduceFn
- type Result
- type State
- type StateCacheKey
Constants ¶
This section is empty.
Variables ¶
View Source
var Digit = OneOfChar("0123456789")
Functions ¶
This section is empty.
Types ¶
type ParseFn ¶
func Choice ¶
Return first result matching one of the given parsers or error if none of the parsers match.
func DiscardMiddle ¶
func ForwardRef ¶
func NoneOfChar ¶
func OneOrZero ¶
Parse one of zero matches of the given parser. Returns the type's zero value on zero.
func StringFromRunes ¶
Convenience combinator to go from runes to string
func Whitespace ¶
type State ¶
type State struct {
// contains filtered or unexported fields
}
func (State) CacheKey ¶
func (s State) CacheKey() StateCacheKey
func (State) ConsumeSize ¶
type StateCacheKey ¶
type StateCacheKey struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.