token

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2019 License: GPL-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package token contains identifiers for the various logical things we find in our source-scripts.

Index

Constants

View Source
const (
	AND       = "&&"
	ASSIGN    = "="
	ASTERISK  = "*"
	BANG      = "!"
	COLON     = ":"
	COMMA     = ","
	CONTAINS  = "~="
	ELSE      = "ELSE"
	EOF       = "EOF"
	EQ        = "=="
	FALSE     = "FALSE"
	FLOAT     = "FLOAT"
	GT        = ">"
	GT_EQUALS = ">="
	IDENT     = "IDENT"
	IF        = "IF"
	ILLEGAL   = "ILLEGAL"
	INT       = "INT"
	LBRACE    = "{"
	LPAREN    = "("
	LT        = "<"
	LT_EQUALS = "<="
	MINUS     = "-"
	MISSING   = "!~"
	MOD       = "%"
	NOT_EQ    = "!="
	OR        = "||"
	PERIOD    = "."
	PLUS      = "+"
	POW       = "**"
	RBRACE    = "}"
	RETURN    = "RETURN"
	RPAREN    = ")"
	SEMICOLON = ";"
	SLASH     = "/"
	SQRT      = "√"
	STRING    = "STRING"
	TRUE      = "TRUE"
)

pre-defined Type

Variables

This section is empty.

Functions

This section is empty.

Types

type Token

type Token struct {
	Type    Type
	Literal string
}

Token struct represent the lexer token

type Type

type Type string

Type is a string

func LookupIdentifier

func LookupIdentifier(identifier string) Type

LookupIdentifier used to determinate whether identifier is keyword nor not

Jump to

Keyboard shortcuts

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