lexer

package
v0.0.0-...-d977049 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package lexer is generated by GoGLL. Do not edit.

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 New

func New(input []rune) *Lexer

func NewFile

func NewFile(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)

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