lexer

package
Version: v0.0.0-...-0469269 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2015 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 Token

type Token struct {
	Type                         TokenType
	Contents                     string
	CharNumber, LineNumber       int
	EndCharNumber, EndLineNumber int
	Filename                     string
}

func Lex

func Lex(input []rune, filename string, verbose bool) []*Token

type TokenType

type TokenType int
const (
	TOKEN_RUNE TokenType = iota
	TOKEN_IDENTIFIER
	TOKEN_SEPARATOR
	TOKEN_OPERATOR
	TOKEN_NUMBER
	TOKEN_ERRONEOUS
	TOKEN_STRING
	TOKEN_UNKNOWN
	TOKEN_COMMENT
	TOKEN_DOCCOMMENT
	TOKEN_END_OF_FILE
)

func (TokenType) String

func (i TokenType) String() string

Jump to

Keyboard shortcuts

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