lexer

package
v0.0.0-...-f82cdda Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintDebugTokens

func PrintDebugTokens(tokens []token.Token)

Types

type Lexer

type Lexer struct {
	CurrentLineNumber                  int
	CurrentLineExternalFileErrorReport int
	CurrentLineCharacterIndex          int

	Tokens      []token.Token
	TokenCursor int

	InputSource []rune
	InputCursor int

	TotalLinesProcessed int
}

func NewLexer

func NewLexer(source string) *Lexer

func NewLexerFromBinary

func NewLexerFromBinary(filepath string) *Lexer

func NewLexerFromSource

func NewLexerFromSource(filepath string) *Lexer

func (*Lexer) DebugTokensToNaive

func (l *Lexer) DebugTokensToNaive()

func (*Lexer) DumpTokensToBinary

func (l *Lexer) DumpTokensToBinary(outputPath string)

func (*Lexer) DumpTokensToFile

func (l *Lexer) DumpTokensToFile(outputPath string)

func (*Lexer) Tokenize

func (l *Lexer) Tokenize() []token.Token

Jump to

Keyboard shortcuts

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