lexer

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Lex

func Lex(input string) []token.Token

func Print

func Print(input string) string

Print the input as tokens

Types

type Lexer

type Lexer struct {
	Token token.Token // Current token
	// contains filtered or unexported fields
}

func New

func New(input string) *Lexer

func (*Lexer) Latest

func (l *Lexer) Latest() token.Token

TODO: replace with an errorf that creates a nice error message

func (*Lexer) Next

func (l *Lexer) Next() bool

func (*Lexer) Peak

func (l *Lexer) Peak(nth int) token.Token

Jump to

Keyboard shortcuts

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