token

package
v0.2.56 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: MPL-2.0 Imports: 0 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

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

	// Identifiers + literals
	IDENT  = "IDENT"  // add, foobar, x, y, ...
	INT    = "INT"    // 1343456
	STRING = "STRING" // "foobar"
	NULL   = "NULL"   // null

	// Operators
	ASSIGN   = "="
	PLUS     = "+"
	MINUS    = "-"
	BANG     = "!"
	ASTERISK = "*"
	SLASH    = "/"
	CONCAT   = "."
	MATCH    = "=~"
	NO_MATCH = "!~"
	LAND     = "&&"
	LOR      = "||"

	// Number
	FLOAT    = "FLOAT"
	NEGATIVE = "-"

	// Comparisons
	LT     = "<"
	LT_EQ  = "<="
	GT     = ">"
	GT_EQ  = ">="
	EQ     = "=="
	NOT_EQ = "!="

	// Delimiters
	COMMA     = ","
	SEMICOLON = ";"
	COLON     = ":"

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

	// Keywords
	FUNCTION = "FUNCTION"
	LET      = "LET"
	SET      = "SET"
	TRUE     = "TRUE"
	FALSE    = "FALSE"
	IF       = "IF"
	ELSE     = "ELSE"
	RETURN   = "RETURN"
	WHEN     = "WHEN"
	SELECT   = "SELECT"
	AS       = "AS"
	DEFAULT  = "DEFAULT"
	WITH     = "WITH"
	PRIORITY = "PRIORITY"
	EXEC     = "EXEC"
	EMIT     = "EMIT"
	LOOP     = "LOOP"
	UNTIL    = "UNTIL"

	// Filtering
	BRANCH = "BRANCH"
	STAR   = "STAR"
	REGEX  = "REGEX"

	// Function-call sigil. `&fn(args...)` introduces a runtime
	// function-call value. Literal carries the identifier (no `&`).
	// See internal docs/todo-txcl-expressions.md.
	AMP_IDENT = "AMP_IDENT"
)

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