writer

package
v0.0.0-...-8196681 Latest Latest
Warning

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

Go to latest
Published: May 26, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

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 NewLexer

func NewLexer(in io.Reader) *Lexer

NewLexer creates a new lexer without init.

func NewLexerWithInit

func NewLexerWithInit(in io.Reader, initFun func(*Lexer)) *Lexer

NewLexerWithInit creates a new Lexer object, runs the given callback on it, then returns it.

func (*Lexer) Column

func (yylex *Lexer) Column() int

Column returns the current column number. The first column is 0.

func (*Lexer) Error

func (yylex *Lexer) Error(e string)

Error is used to report an error to the lexer.

func (*Lexer) Lex

func (yylex *Lexer) Lex(lval *yySymType) int

Lex runs the lexer.

func (*Lexer) Line

func (yylex *Lexer) Line() int

Line returns the current line number. The first line is 0.

func (*Lexer) Stop

func (yylex *Lexer) Stop()

Stop cancels the background scanner.

func (*Lexer) Text

func (yylex *Lexer) Text() string

Text returns the matched text.

type LexerBuilder

type LexerBuilder struct {
	Standalone   bool
	CustomError  bool
	CustomPrefix string
	// contains filtered or unexported fields
}

func (*LexerBuilder) DumpFormattedLexer

func (b *LexerBuilder) DumpFormattedLexer(program *parser.NexProgram) ([]byte, error)

func (*LexerBuilder) WriteLexer

func (b *LexerBuilder) WriteLexer(program *parser.NexProgram, writer io.Writer) error

Jump to

Keyboard shortcuts

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