lexer

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InvalidHereDocSyntaxError

func InvalidHereDocSyntaxError(filename string, pos tokens.Pos) error

func UnterminatedStringError

func UnterminatedStringError(filename string, pos tokens.Pos) error

Types

type Lexer

type Lexer struct {
	// contains filtered or unexported fields
}

func NewLexer

func NewLexer(reader io.Reader, filename string) *Lexer

func (*Lexer) NextToken

func (l *Lexer) NextToken() tokens.Instance

NextToken returns the next token from the input

func (*Lexer) PushBack added in v0.0.3

func (l *Lexer) PushBack(t tokens.Instance)

PushBack returns a token to the stream so the next NextToken yields it. Used for speculative lookahead in the parser (e.g. grouped vs lambda).

type LexerError

type LexerError struct {
	Filename string
	Position tokens.Pos
}

func (*LexerError) Error

func (e *LexerError) Error() string

Jump to

Keyboard shortcuts

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