lexer

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2019 License: MIT Imports: 6 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
}

Lexer emits tokens from a input reader

func NewLexer added in v1.0.0

func NewLexer() *Lexer

NewLexer initializes a new lexer

func (*Lexer) AppendBytes added in v1.3.0

func (l *Lexer) AppendBytes(input []byte) (err error)

func (*Lexer) ByteSlice added in v1.0.0

func (l *Lexer) ByteSlice(reference document.ByteSliceReference) document.ByteSlice

func (*Lexer) Peek added in v1.0.0

func (l *Lexer) Peek(ignoreWhitespace bool) keyword.Keyword

Peek will emit the next keyword without advancing the reader position

func (*Lexer) Read

func (l *Lexer) Read() (tok token.Token)

Read emits the next token, this cannot be undone

func (*Lexer) ResetTypeSystemInput added in v1.3.0

func (l *Lexer) ResetTypeSystemInput()

func (*Lexer) SetExecutableInput added in v1.0.0

func (l *Lexer) SetExecutableInput(input []byte) error

func (*Lexer) SetTypeSystemInput added in v1.0.0

func (l *Lexer) SetTypeSystemInput(input []byte) error

SetTypeSystemInput sets the new reader as input and resets all position stats

func (*Lexer) TextPosition added in v1.0.0

func (l *Lexer) TextPosition() position.Position

Jump to

Keyboard shortcuts

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