lexer

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsChar

func IsChar(r1 rune) func(rune) bool

func IsInt

func IsInt(r rune) bool

func IsNonWordChar

func IsNonWordChar(r rune) bool

func IsWordChar

func IsWordChar(r rune) bool

Types

type Lexer

type Lexer struct {
	// contains filtered or unexported fields
}

func NewLexer

func NewLexer(str string) Lexer

func (*Lexer) Backup

func (l *Lexer) Backup()

func (*Lexer) BackupN

func (l *Lexer) BackupN(n int)

func (*Lexer) IsEof

func (l *Lexer) IsEof() bool

func (*Lexer) Pos

func (l *Lexer) Pos() int

func (*Lexer) Read

func (l *Lexer) Read() (rune, bool)

func (*Lexer) ReadChar

func (l *Lexer) ReadChar(r1 rune) bool

func (*Lexer) ReadIf

func (l *Lexer) ReadIf(fn func(rune) bool) (rune, bool)

func (*Lexer) ReadInt

func (l *Lexer) ReadInt() (int, bool)

func (*Lexer) ReadUntil

func (l *Lexer) ReadUntil(fn func(rune) bool) string

func (*Lexer) ReadWhile

func (l *Lexer) ReadWhile(fn func(rune) bool) string

Jump to

Keyboard shortcuts

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