token

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ILLEGAL = "ILLEGAL"
	EOF     = "EOF"

	IDENT = "IDENT"
	INT   = "INT"
	STR   = "STRING"

	ASSIGN  = "="
	PLUS    = "+"
	MINUS   = "-"
	MUL     = "*"
	DIV     = "/"
	MOD     = "%"
	LESS    = "<"
	GREATER = ">"

	NOT = "!"
	OR  = "|"
	XOR = "^"
	AND = "&"
	REV = "~"

	EQUALS    = "=="
	NOTEQUALS = "!="
	LESSEQ    = "<="
	GREATEREQ = ">="

	LSHIFT = "<<"
	RSHIFT = ">>"

	LOGICAND = "&&"
	LOGICOR  = "||"

	COMMA   = ","
	COLON   = ":"
	PERIOD  = "."
	NEWLINE = "\n"

	LPAREN = "("
	RPAREN = ")"
	LBRACK = "["
	RBRACK = "]"
	LBRACE = "{"
	RBRACE = "}"

	FUNCTION = "FUNCTION"
	VAR      = "VAR"
	TRY      = "TRY"
	TRUE     = "TRUE"
	FALSE    = "FALSE"
	IF       = "IF"
	ELSE     = "ELSE"
	RET      = "RET"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Token

type Token struct {
	Type    TokenType
	Literal string
}

type TokenType

type TokenType string

func LookupIdentifier

func LookupIdentifier(identifier string) TokenType

Jump to

Keyboard shortcuts

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