token

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BraceL = string(braceL)

	BraceR = string(braceR)

	BracketL = string(bracketL)

	BracketR = string(bracketR)

	Colon = string(colon)

	Equal = string(equal)

	SingQuote = string(singQuote)
)

Variables

View Source
var (
	ErrNewlineInSingQuoteString = errors.New("newline in single quote string")
)

Functions

This section is empty.

Types

type Reader

type Reader interface {
	// Returns io.EOF, if no more tokens available.
	// This especially means, that if a non nil token is returned, err is nil.
	// Other errors may be returned at any time.
	Next() (t *Token, err error)

	// Resets the reader to read from the given rune reader.
	Reset(rr io.RuneReader)
}

func NewReader

func NewReader(rr io.RuneReader) Reader

type Token

type Token struct {
	Value string
	Line  int
}

Jump to

Keyboard shortcuts

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