interpreter

package
v0.0.0-...-f318d61 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lexer

type Lexer struct {
	I      []rune
	Tokens []*token.Token
}

func InitNewLexer

func InitNewLexer(_src []rune) *Lexer

func NewInputFile

func NewInputFile(fname string) *Lexer

func (*Lexer) GetLineColumn

func (l *Lexer) GetLineColumn(i int) (line, col int)

GetLineColumn returns the line and column of rune[i] in the input

func (*Lexer) GetLineColumnOfToken

func (l *Lexer) GetLineColumnOfToken(i int) (line, col int)

GetLineColumnOfToken returns the line and column of token[i] in the imput

func (*Lexer) GetString

func (l *Lexer) GetString(lext, rext int) string

GetString returns the input string from the left extent of Token[lext] to the right extent of Token[rext]

Jump to

Keyboard shortcuts

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