token

package
v1.0.0-early-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Integer = "Integer"
	String  = "String"

	If   = "if"
	Else = "else"

	Iden = "Identifier"

	Semicolon = ";"
	Eq        = "="
	Comma     = ","

	Plus  = "+"
	Minus = "-"
	Star  = "*"
	Slash = "/"

	LParen = "("
	RParen = ")"

	LCurly = "{"
	RCurly = "}"

	Newline = "Newline"
	Illegal = "Illegal"
	EOF     = "End of file"
)

Variables

View Source
var Keywords = map[string]string{
	"if":   If,
	"else": Else,
}

All Keywords

Functions

This section is empty.

Types

type Token

type Token struct {
	Type    string
	Literal string
	Char    int // end char
	Line    int // end line
}

The base Token struct

Jump to

Keyboard shortcuts

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