lexer

package
v0.0.0-...-1559108 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lexer

type Lexer struct {
	Line int
	Col  int // curren col Loc
	// contains filtered or unexported fields
}

Lexer parses an Input string (embedded in token pkg) and returns it as tokens - defined in token package.

func New

func New(input string) *Lexer

func (*Lexer) CLoc

func (l *Lexer) CLoc() int

func (*Lexer) GetLoc

func (l *Lexer) GetLoc() *token.Pos

func (*Lexer) Input

func (l *Lexer) Input() string

func (*Lexer) Loc

func (l *Lexer) Loc() (int, int)

func (*Lexer) NextToken

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

Jump to

Keyboard shortcuts

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