lexer

package
v0.0.0-...-a98d9d1 Latest Latest
Warning

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

Go to latest
Published: May 7, 2015 License: GPL-3.0 Imports: 6 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 New

func New(file string, str string) *Lexer

func (*Lexer) HasNext

func (l *Lexer) HasNext() bool

func (*Lexer) Token

func (l *Lexer) Token() (*Token, error)

type Reader

type Reader struct {
	*strings.Reader
}

func NewReader

func NewReader(s string) *Reader

func (*Reader) HasNext

func (r *Reader) HasNext() bool

func (*Reader) ReadUntil

func (r *Reader) ReadUntil(stops string) (string, error)

func (*Reader) UnreadRunes

func (r *Reader) UnreadRunes(n int)

type Token

type Token struct {
	// contains filtered or unexported fields
}

func (*Token) Class

func (t *Token) Class() TokenClass

func (*Token) IntValue

func (t *Token) IntValue() int

func (*Token) String

func (t *Token) String() string

func (*Token) StringValue

func (t *Token) StringValue() string

type TokenClass

type TokenClass int
const (
	ClassSymbol TokenClass = iota
	ClassComment
	ClassLParen
	ClassNumber
	ClassQuote
	ClassRParen
	ClassString
)

Jump to

Keyboard shortcuts

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