lexemes

package
v0.0.0-...-5e56d49 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NullLexeme = Lexeme{}

Functions

func CountLexemes

func CountLexemes(lexer ILexer) int

func CountLexemesR

func CountLexemesR(reader io.Reader) int

Types

type ILexer

type ILexer interface {
	Next() *Lexeme
}

func New

func New(tokenizer tokens.ITokenizer) ILexer

func NewR

func NewR(reader io.Reader) ILexer

func NewS

func NewS(text string) ILexer

type Lexeme

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

Lexeme описатель лексемы в тексте

func NewLexeme

func NewLexeme(pos int, last bool, token tokens.Token) *Lexeme

func ReadLexemeList

func ReadLexemeList(lexer ILexer) []Lexeme

func ReadLexemeListS

func ReadLexemeListS(text string) []Lexeme

func (*Lexeme) Apply

func (l *Lexeme) Apply(pos int, last bool, token tokens.Token) *Lexeme

func (*Lexeme) Copy

func (l *Lexeme) Copy() Lexeme

func (*Lexeme) Finish

func (l *Lexeme) Finish() int

func (*Lexeme) IsEof

func (l *Lexeme) IsEof() bool

func (*Lexeme) IsLastInStatement

func (l *Lexeme) IsLastInStatement() bool

func (*Lexeme) IsUndefined

func (l *Lexeme) IsUndefined() bool

func (*Lexeme) Len

func (l *Lexeme) Len() int

func (*Lexeme) Start

func (l *Lexeme) Start() int

func (*Lexeme) StatementPosition

func (l *Lexeme) StatementPosition() int

func (*Lexeme) Value

func (l *Lexeme) Value() string

Jump to

Keyboard shortcuts

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