lexer

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 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) 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) 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