token

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

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

	COMMENT      = "#"
	IDENT        = "IDENT"
	TYPE_PATTERN = "TYPE_PATTERN"
	DELIMETER    = ";"

	// Operators
	OP_EQUAL_TO      = "=="
	OP_NOT_EQUAL     = "!="
	OP_LESS_THAN     = "<"
	OP_GREATER_THAN  = ">"
	OP_LESS_EQUAL    = "<="
	OP_GREATER_EQUAL = ">="
	OPEN_PAREN       = "("
	CLOSE_PAREN      = ")"

	// keywords
	WITH    = "with"
	SUBJECT = "subject"
	GROUP   = "group"
	USER    = "user"
	TO      = "to"
	WHERE   = "where"
	AND     = "and"
	OR      = "or"
)

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 LookupIdent

func LookupIdent(ident string) TokenType

func LookupOperator

func LookupOperator(op string) TokenType

func LookupOperatorComparison

func LookupOperatorComparison(op string) TokenType

Jump to

Keyboard shortcuts

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