Documentation
¶
Index ¶
- type EndOfInputError
- type Parser
- func (x *Parser) Captured() string
- func (x *Parser) CurrentContext() string
- func (x *Parser) CurrentIndex() int
- func (x *Parser) GetNext(runeCount int) (string, error)
- func (x *Parser) GetNextMax(runeCount int) string
- func (x *Parser) GetNextRune() (rune, error)
- func (x *Parser) HasMore() bool
- func (x *Parser) IsExhausted() bool
- func (x *Parser) LookingAtDigit() bool
- func (x *Parser) LookingAtLetter() bool
- func (x *Parser) LookingAtRune(r rune) bool
- func (x *Parser) LookingAtString(expected string) bool
- func (x *Parser) LookingAtWhitespace() bool
- func (x *Parser) MustGetNext(runeCount int) string
- func (x *Parser) MustGetNextRune() rune
- func (x *Parser) MustGetNextWord() string
- func (x *Parser) MustReadInt() int
- func (x *Parser) MustReadRestOfInput() string
- func (x *Parser) MustReadRestOfLine() string
- func (x *Parser) MustReadRune() rune
- func (x *Parser) MustReadRunes(runeCount int) []rune
- func (x *Parser) MustReadToAnyString(limitStrings []string) string
- func (x *Parser) MustReadToAnyStringOrEnd(limitStrings []string) string
- func (x *Parser) MustReadToMatching(open, close rune) string
- func (x *Parser) MustReadToMatchingEscaped(open, close, escape rune) string
- func (x *Parser) MustReadToMatchingEscapedSkipDelims(open, close, escape rune) string
- func (x *Parser) MustReadToMatchingSkipDelims(open, close rune) string
- func (x *Parser) MustReadToPositionString(newPosition int) string
- func (x *Parser) MustReadToRune(stopRune rune) string
- func (x *Parser) MustReadWord() string
- func (x *Parser) MustSkip(runeCount int) *Parser
- func (x *Parser) MustSkipAnyWhitespaces() *Parser
- func (x *Parser) MustSkipNewlines() *Parser
- func (x *Parser) MustSkipRestOfLine() *Parser
- func (x *Parser) MustSkipSpaces() *Parser
- func (x *Parser) MustSkipString(expected string) *Parser
- func (x *Parser) MustSkipToString(expected string) *Parser
- func (x *Parser) MustSkipToWhitespace() *Parser
- func (x *Parser) Processed() string
- func (x *Parser) ReadInt() (int, error)
- func (x *Parser) ReadRestOfInput() (string, error)
- func (x *Parser) ReadRestOfLine() (string, error)
- func (x *Parser) ReadRune() (rune, error)
- func (x *Parser) ReadRunes(runeCount int) ([]rune, error)
- func (x *Parser) ReadToAnyString(limitStrings []string) (string, error)
- func (x *Parser) ReadToAnyStringOrEnd(limitStrings []string) (string, error)
- func (x *Parser) ReadToMatching(open, close rune) (string, error)
- func (x *Parser) ReadToMatchingEscaped(open, close, escape rune) (string, error)
- func (x *Parser) ReadToMatchingEscapedSkipDelims(open, close, escape rune) (string, error)
- func (x *Parser) ReadToMatchingSkipDelims(open, close rune) (string, error)
- func (x *Parser) ReadToPositionString(newPosition int) (string, error)
- func (x *Parser) ReadToRune(stopRune rune) (string, error)
- func (x *Parser) ReadWord() (string, error)
- func (x *Parser) Remaining() string
- func (x *Parser) RemainingRuneCount() int
- func (x *Parser) Skip(runeCount int) error
- func (x *Parser) SkipAny(runes []rune) error
- func (x *Parser) SkipAnyWhitespaces() error
- func (x *Parser) SkipNewlines() error
- func (x *Parser) SkipRestOfLine() error
- func (x *Parser) SkipSpaces() error
- func (x *Parser) SkipString(expected string) error
- func (x *Parser) SkipTo(newIndex int) error
- func (x *Parser) SkipToEnd() *Parser
- func (x *Parser) SkipToString(expected string) error
- func (x *Parser) SkipToWhitespace() error
- func (x *Parser) StartCapture() *Parser
- func (x *Parser) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EndOfInputError ¶
type EndOfInputError struct{}
func (EndOfInputError) Error ¶
func (x EndOfInputError) Error() string
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (*Parser) CurrentContext ¶
func (*Parser) CurrentIndex ¶
CurrentIndex returns the current internal parser index aka how many runes have been processed already.
func (*Parser) GetNextMax ¶
func (*Parser) GetNextRune ¶
func (*Parser) IsExhausted ¶
func (*Parser) LookingAtDigit ¶ added in v0.2.0
func (*Parser) LookingAtLetter ¶ added in v0.2.0
func (*Parser) LookingAtRune ¶
func (*Parser) LookingAtString ¶
LookingAtString determines if from the current position, the next runes would equal the expected string provided.
func (*Parser) LookingAtWhitespace ¶
func (*Parser) MustGetNext ¶
func (*Parser) MustGetNextRune ¶
func (*Parser) MustGetNextWord ¶
func (*Parser) MustReadInt ¶
func (*Parser) MustReadRestOfInput ¶
func (*Parser) MustReadRestOfLine ¶
func (*Parser) MustReadRune ¶
func (*Parser) MustReadRunes ¶
func (*Parser) MustReadToAnyString ¶
func (*Parser) MustReadToAnyStringOrEnd ¶
func (*Parser) MustReadToMatching ¶
func (*Parser) MustReadToMatchingEscaped ¶ added in v0.3.0
func (*Parser) MustReadToMatchingEscapedSkipDelims ¶ added in v0.4.0
func (*Parser) MustReadToMatchingSkipDelims ¶ added in v0.4.0
func (*Parser) MustReadToPositionString ¶
func (*Parser) MustReadToRune ¶
func (*Parser) MustReadWord ¶
func (*Parser) MustSkipAnyWhitespaces ¶
func (*Parser) MustSkipNewlines ¶
func (*Parser) MustSkipRestOfLine ¶
func (*Parser) MustSkipSpaces ¶
func (*Parser) MustSkipString ¶
func (*Parser) MustSkipToString ¶
func (*Parser) MustSkipToWhitespace ¶
func (*Parser) ReadRestOfInput ¶
func (*Parser) ReadRestOfLine ¶
func (*Parser) ReadToAnyString ¶
func (*Parser) ReadToAnyStringOrEnd ¶
func (*Parser) ReadToMatchingEscaped ¶ added in v0.3.0
func (*Parser) ReadToMatchingEscapedSkipDelims ¶ added in v0.4.0
func (*Parser) ReadToMatchingSkipDelims ¶ added in v0.4.0
func (*Parser) ReadToPositionString ¶
func (*Parser) ReadWord ¶
ReadWord reads exactly one word of input. Stops at space, newline and end of input. Error if the input end is already reached.
func (*Parser) RemainingRuneCount ¶
func (*Parser) SkipAnyWhitespaces ¶
func (*Parser) SkipNewlines ¶
func (*Parser) SkipRestOfLine ¶
func (*Parser) SkipSpaces ¶
func (*Parser) SkipString ¶
func (*Parser) SkipTo ¶
SkipTo skips to index newIndex without returning the intermediate runes (forward only).
func (*Parser) SkipToString ¶
func (*Parser) SkipToWhitespace ¶
func (*Parser) StartCapture ¶
StartCapture starts collecting output, see Captured to retrieve it.
Click to show internal directories.
Click to hide internal directories.