lexer

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

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

Go to latest
Published: Feb 15, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lex

type Lex struct {
	*scanner.Scanner
	Token rune
}

Lex is lexer for gigue. Lex provides token for scheme.

func New

func New(r io.Reader) *Lex

New returns new lexer

func (*Lex) IsTokenString

func (l *Lex) IsTokenString() bool

IsTokenString check if token is string. It's use for get unquoted string in parser.

func (*Lex) Next

func (l *Lex) Next() (string, error)

Next returns next scheme token Parser calls this Next() iteratively for fetching token.

func (*Lex) Scan

func (lex *Lex) Scan()

Scan makes scan

func (*Lex) TokenAll

func (l *Lex) TokenAll() (tokens []string, err error)

TokenAll returns all token generated by lexer. It is useful for testing lexer.

Jump to

Keyboard shortcuts

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