lexer

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2022 License: MIT Imports: 5 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 {
	// contains filtered or unexported fields
}

func New

func New(r io.Reader, opts ...OptionFunc) *Lexer

func NewFromString

func NewFromString(input string, opts ...OptionFunc) *Lexer

func (*Lexer) GetLine

func (l *Lexer) GetLine(n int) (string, bool)

func (*Lexer) LineCount added in v0.8.0

func (l *Lexer) LineCount() int

func (*Lexer) NewLine

func (l *Lexer) NewLine()

func (*Lexer) NextToken

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

nolint: funlen,gocognit,gocyclo

func (*Lexer) PeekToken added in v0.0.7

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

type Option

type Option struct {
	Filename string
}

type OptionFunc

type OptionFunc func(o *Option)

func WithFile

func WithFile(filename string) OptionFunc

Jump to

Keyboard shortcuts

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