token

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2023 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

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

	// Identifiers + literals
	IDENT  = "IDENT"  // not, equals, json_path, contains, range...
	INT    = "INT"    // 200, 201
	FLOAT  = "FLOAT"  // 10.5
	STRING = "STRING" // Content-Type

	// Operators
	PLUS     = "+"
	MINUS    = "-"
	BANG     = "!"
	ASTERISK = "*"
	SLASH    = "/"
	AND      = "&&"
	OR       = "||"

	LT = "<"
	GT = ">"

	EQ     = "=="
	NOT_EQ = "!="

	// Delimiters
	COMMA = ","

	LPAREN   = "("
	RPAREN   = ")"
	LBRACE   = "{"
	RBRACE   = "}"
	LBRACKET = "["
	RBRACKET = "]"

	COLON = ":"

	// Keywords
	TRUE  = "TRUE"
	FALSE = "FALSE"
	NULL  = "NULL"
)

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

Jump to

Keyboard shortcuts

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