lexer

package
v0.0.0-...-50a66e4 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2017 License: MIT Imports: 5 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
}

Lexer represents the lexer.

func New

func New(reader *reader.Reader) *Lexer

New initializes a Lexer.

func (*Lexer) NextToken

func (l *Lexer) NextToken() token.Token

NextToken returns the next token.

type Symbol

type Symbol struct{}

Symbol represents the symbol table.

func (*Symbol) Insert

func (s *Symbol) Insert(name string, t token.TokenType)

Insert adds a new symbol to the store.

func (*Symbol) Lookup

func (s *Symbol) Lookup(name string) (token.TokenType, bool)

Lookup returns a symbol by name.

Jump to

Keyboard shortcuts

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