Documentation ¶
Index ¶
- func IsEqual(a rune) matchFn
- func IsNumeric(i rune) bool
- func IsOneOf(a ...rune) matchFn
- type StateFn
- type Tokenizer
- func (t *Tokenizer[Token]) Done() bool
- func (t *Tokenizer[Token]) Ignore()
- func (t *Tokenizer[Token]) IgnoreUntil(fn matchFn)
- func (t *Tokenizer[Token]) IgnoreWhile(fn matchFn)
- func (t *Tokenizer[Token]) NextRune() rune
- func (t *Tokenizer[Token]) Peek() rune
- func (t *Tokenizer[Token]) PeekMatch(fn matchFn) bool
- func (t *Tokenizer[Token]) ReadUntil(fn matchFn) []rune
- func (t *Tokenizer[Token]) Tokens() iter.Seq[Token]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Tokenizer ¶
type Tokenizer[Token any] struct { // contains filtered or unexported fields }
func NewTokenizer ¶
func NewTokenizer[Token any](input io.RuneScanner, initialState StateFn[Token]) *Tokenizer[Token]
func (*Tokenizer[Token]) IgnoreUntil ¶
func (t *Tokenizer[Token]) IgnoreUntil(fn matchFn)
func (*Tokenizer[Token]) IgnoreWhile ¶
func (t *Tokenizer[Token]) IgnoreWhile(fn matchFn)
Click to show internal directories.
Click to hide internal directories.