tokenizer

package
v0.0.0-...-72bbb21 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MAX_TOKEN_SIZE = 23
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SimpleTokenizer

type SimpleTokenizer struct {
	Done bool
	Err  error
	// contains filtered or unexported fields
}

func NewSimpleTokenizer

func NewSimpleTokenizer(input []byte) (*SimpleTokenizer, error)

func (*SimpleTokenizer) Tokenize

func (t *SimpleTokenizer) Tokenize() iter.Seq[Token]

type Token

type Token struct {
	TokenBytes [1 + MAX_TOKEN_SIZE]byte
	TokenPos   int32
	BytePos    int32
}

Jump to

Keyboard shortcuts

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