fetoken

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package fetoken contains the token classes used by the frontend of TunaScript. It is in a separate package so that it can be imported and used by external packages while still allowing those external packages to be imported by the rest of the frontend.

Index

Constants

This section is empty.

Variables

View Source
var (
	// TCExclamationMark is the token class representing a logical-not operator "!" in TunaScript.
	TCExclamationMark = lex.NewTokenClass("!", "logical-not operator \"!\"")

	// TCAsterisk is the token class representing a multiplication sign "*" in TunaScript.
	TCAsterisk = lex.NewTokenClass("*", "multiplication sign \"*\"")

	// TCPlusSign is the token class representing a plus sign "+" in TunaScript.
	TCPlusSign = lex.NewTokenClass("+", "plus sign \"+\"")

	// TCPlusSignplusSign is the token class representing an increment operator "++" in TunaScript.
	TCPlusSignplusSign = lex.NewTokenClass("++", "increment operator \"++\"")

	// TCPlusSignequalsSign is the token class representing a plus-equals sign "+=" in TunaScript.
	TCPlusSignequalsSign = lex.NewTokenClass("+=", "plus-equals sign \"+=\"")

	// TCHyphenMinus is the token class representing a minus sign "-" in TunaScript.
	TCHyphenMinus = lex.NewTokenClass("-", "minus sign \"-\"")

	// TCHyphenMinushyphenMinus is the token class representing a decrement operator "--" in TunaScript.
	TCHyphenMinushyphenMinus = lex.NewTokenClass("--", "decrement operator \"--\"")

	// TCEqualsSign is the token class representing a minus-equals sign "-=" in TunaScript.
	TCEqualsSign = lex.NewTokenClass("-=", "minus-equals sign \"-=\"")

	// TCSolidus is the token class representing a divide sign "/" in TunaScript.
	TCSolidus = lex.NewTokenClass("/", "divide sign \"/\"")

	// TCLessThanSign is the token class representing a less-than sign "<" in TunaScript.
	TCLessThanSign = lex.NewTokenClass("<", "less-than sign \"<\"")

	// TCLessThanSignequalsSign is the token class representing a less-than-equals sign "<=" in TunaScript.
	TCLessThanSignequalsSign = lex.NewTokenClass("<=", "less-than-equals sign \"<=\"")

	// TCGreaterThanSign is the token class representing a greater-than sign ">" in TunaScript.
	TCGreaterThanSign = lex.NewTokenClass(">", "greater-than sign \">\"")

	// TCGreaterThanSignequalsSign is the token class representing a greater-than-equals sign ">=" in TunaScript.
	TCGreaterThanSignequalsSign = lex.NewTokenClass(">=", "greater-than-equals sign \">=\"")

	// TCCommercialAtstr is the token class representing a @-text value in TunaScript.
	TCCommercialAtstr = lex.NewTokenClass("@str", "@-text value")

	// TCAnd is the token class representing a logical-and operator "&&" in TunaScript.
	TCAnd = lex.NewTokenClass("and", "logical-and operator \"&&\"")

	// TCBool is the token class representing a boolean (true/false) value in TunaScript.
	TCBool = lex.NewTokenClass("bool", "boolean (true/false) value")

	// TCComma is the token class representing a "," in TunaScript.
	TCComma = lex.NewTokenClass("comma", "\",\"")

	// TCEq is the token class representing a double-equals sign "==" in TunaScript.
	TCEq = lex.NewTokenClass("eq", "double-equals sign \"==\"")

	// TCId is the token class representing an identifier in TunaScript.
	TCId = lex.NewTokenClass("id", "identifier")

	// TCLp is the token class representing a "(" in TunaScript.
	TCLp = lex.NewTokenClass("lp", "\"(\"")

	// TCNe is the token class representing a not-equals sign "!=" in TunaScript.
	TCNe = lex.NewTokenClass("ne", "not-equals sign \"!=\"")

	// TCNum is the token class representing a number value in TunaScript.
	TCNum = lex.NewTokenClass("num", "number value")

	// TCOr is the token class representing a logical-or operator "||" in TunaScript.
	TCOr = lex.NewTokenClass("or", "logical-or operator \"||\"")

	// TCRp is the token class representing a ")" in TunaScript.
	TCRp = lex.NewTokenClass("rp", "\")\"")

	// TCSet is the token class representing a set operator "=" in TunaScript.
	TCSet = lex.NewTokenClass("set", "set operator \"=\"")

	// TCStr is the token class representing a text value in TunaScript.
	TCStr = lex.NewTokenClass("str", "text value")
)

Functions

func ByID

func ByID(id string) lex.TokenClass

ByID returns the TokenClass in TunaScript that has the given ID. If no token class with that ID exists, nil is returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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