Documentation ¶
Overview ¶
Package parser contains the main structs for parsing
Index ¶
- Constants
- type EndNode
- func (e EndNode) Pos() parsley.Pos
- func (e EndNode) ReaderPos() parsley.Pos
- func (e EndNode) Schema() interface{}
- func (e EndNode) SetReaderPos(func(parsley.Pos) parsley.Pos)
- func (e EndNode) String() string
- func (e EndNode) Token() string
- func (e EndNode) Value(userCtx interface{}) (interface{}, parsley.Error)
- type Func
- type FuncWrapper
Constants ¶
View Source
const EOF = "EOF"
EOF is the end-of-file token
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EndNode ¶ added in v0.17.0
EndNode represents an eof node
func (EndNode) Schema ¶ added in v0.17.0
func (e EndNode) Schema() interface{}
Schema returns with nil
func (EndNode) SetReaderPos ¶ added in v0.17.0
SetReaderPos changes the reader position
type Func ¶
type Func func(ctx *parsley.Context, leftRecCtx data.IntMap, pos parsley.Pos) (parsley.Node, data.IntSet, parsley.Error)
Func defines a helper to implement the Parser interface with functions
func ReturnError ¶ added in v0.17.0
ReturnError will override the returned error by the parser if its position is the same as the reader's position
type FuncWrapper ¶ added in v0.17.0
type FuncWrapper struct {
F Func
}
FuncWrapper is a parser which wraps a parser function as a struct It's useful when you have to use a parser recursively as that's not possible with functions
Click to show internal directories.
Click to hide internal directories.