lex

package
Version: v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2018 License: MIT Imports: 1 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(input string) *Lexer

func (*Lexer) Tokenize

func (l *Lexer) Tokenize() []*Token

type Token

type Token struct {
	Lexeme string
	Type   TokenType
	Start  int
}

func NewToken

func NewToken(lexeme string, kind TokenType, start int) *Token

func (*Token) String

func (t *Token) String() string

type TokenType

type TokenType uint
const (
	Word TokenType = iota
)

Source Files

Jump to

Keyboard shortcuts

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