token

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: Apache-2.0 Imports: 1 Imported by: ? modules, 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 EOF = -1

Variables

View Source
var ItemName = map[ItemType]string{
	ItemError:                "error",
	ItemDefer:                "defer",
	ItemIdent:                "identifier",
	ItemDoubleQuote:          "double quote",
	ItemSingleQuote:          "single quote",
	ItemAssign:               "assign",
	ItemLeftCurly:            "curly left",
	ItemRightCurly:           "curly right",
	ItemLeftParen:            "paren left",
	ItemRightParen:           "paren right",
	ItemLeftSquare:           "square left",
	ItemRightSquare:          "square right",
	ItemString:               "string",
	ItemInteger:              "integer",
	ItemFloat:                "float",
	ItemNamespace:            "namespace",
	ItemNamespaceInternal:    "namespace internal",
	ItemComment:              "comment",
	ItemDoubleEqual:          "double equal",
	ItemLessThan:             "less than",
	ItemGreaterThan:          "greater than",
	ItemNotEqual:             "not equal",
	ItemLessOrEqual:          "less or equal",
	ItemGreaterOrEqual:       "greater or equal",
	ItemBool:                 "boolean",
	ItemDollar:               "dollar sign",
	ItemComma:                "comma",
	ItemColon:                "colon",
	ItemQuestion:             "question mark",
	ItemBacktick:             "backtick",
	ItemInfix:                "infix",
	ItemIf:                   "if",
	ItemBreak:                "break",
	ItemElse:                 "else",
	ItemAnd:                  "ampersand",
	ItemOr:                   "vertical bar",
	ItemReturn:               "return",
	ItemNULL:                 "null",
	ItemNA:                   "NA",
	ItemNan:                  "NaN",
	ItemNAString:             "NA string",
	ItemNAReal:               "NA real",
	ItemNAComplex:            "NA complex",
	ItemNAInteger:            "NA integer",
	ItemPipe:                 "native pipe",
	ItemModulus:              "modulus",
	ItemDoubleLeftSquare:     "double left square",
	ItemDoubleRightSquare:    "double right square",
	ItemFor:                  "for loop",
	ItemRepeat:               "repeat",
	ItemWhile:                "while loop",
	ItemNext:                 "next",
	ItemIn:                   "in",
	ItemFunction:             "function",
	ItemPlus:                 "plus",
	ItemMinus:                "minus",
	ItemMultiply:             "multiply",
	ItemDivide:               "divide",
	ItemPower:                "power",
	ItemNewLine:              "new line",
	ItemEOF:                  "end of file",
	ItemTypes:                "type",
	ItemTypesPkg:             "type package",
	ItemTypesList:            "list type",
	ItemTypesDecl:            "type declaration",
	ItemRange:                "range",
	ItemLet:                  "let",
	ItemConst:                "const",
	ItemBang:                 "bang",
	ItemArrow:                "arrow function",
	ItemThreeDot:             "elipsis",
	ItemDecorator:            "decorator",
	ItemDecoratorClass:       "decorator class",
	ItemDecoratorGeneric:     "decorator generic",
	ItemDecoratorDefault:     "decorator default",
	ItemDecoratorFactor:      "decorator factor",
	ItemDecoratorEnvironment: "decorator env",
	ItemAttribute:            "attribute",
	ItemObjList:              "object list",
	ItemObjFunc:              "object function",
	ItemObjDataframe:         "object dataframe",
	ItemObjStruct:            "object struct",
	ItemObjObject:            "object object",
	ItemObjMatrix:            "object matrix",
	ItemObjFactor:            "object factor",
}

Functions

This section is empty.

Types

type Item

type Item struct {
	Class ItemType
	Value string
	Line  int
	Pos   int
	Char  int
	File  string
}

func (Item) Print

func (i Item) Print()

func (Item) String

func (item Item) String() string

type ItemType

type ItemType int
const (
	ItemError ItemType = iota

	// end of file
	ItemEOF

	// identifiers
	ItemIdent

	// quotes
	ItemDoubleQuote
	ItemSingleQuote

	// $
	ItemDollar

	// backtick
	ItemBacktick

	// infix %>%
	ItemInfix

	// comma,
	ItemComma

	// question mark?
	ItemQuestion

	// boolean
	ItemBool

	// boolean
	ItemReturn

	// ...
	ItemThreeDot

	// native pipe
	ItemPipe

	// =
	ItemAssign
	ItemAssignParent

	// NULL
	ItemNULL

	// NA
	ItemNA
	ItemNan
	ItemNAString
	ItemNAReal
	ItemNAComplex
	ItemNAInteger

	// parens and brackets
	ItemLeftCurly
	ItemRightCurly
	ItemLeftParen
	ItemRightParen
	ItemLeftSquare
	ItemRightSquare
	ItemDoubleLeftSquare
	ItemDoubleRightSquare

	// "strings"
	ItemString

	// numbers
	ItemInteger
	ItemFloat

	// namespace::
	ItemNamespace
	// namespace:::
	ItemNamespaceInternal

	// colon
	ItemColon

	// New line \n
	ItemNewLine

	// + - / * ^
	ItemPlus
	ItemMinus
	ItemDivide
	ItemMultiply
	ItemPower
	ItemModulus

	// bang!
	ItemBang

	// comment
	ItemComment

	// compare
	ItemDoubleEqual
	ItemLessThan
	ItemGreaterThan
	ItemNotEqual
	ItemLessOrEqual
	ItemGreaterOrEqual

	// if else
	ItemIf
	ItemElse
	ItemAnd
	ItemOr
	ItemBreak

	// Infinite
	ItemInf

	// loop
	ItemFor
	ItemRepeat
	ItemWhile
	ItemNext
	ItemIn

	// func
	ItemFunction

	// arrow function =>
	ItemArrow

	// declare
	ItemLet
	ItemConst

	// types
	ItemTypes
	ItemTypesPkg
	ItemTypesList
	ItemTypesDecl

	// range..
	ItemRange

	// objects
	ItemObjDataframe
	ItemObjList   // list()
	ItemObjObject // named list()
	ItemObjStruct
	ItemObjMatrix
	ItemObjFunc
	ItemObjFactor
	ItemObjEnvironment

	// @decorators
	ItemDecorator
	ItemDecoratorClass
	ItemDecoratorGeneric
	ItemDecoratorDefault
	ItemDecoratorMatrix
	ItemDecoratorFactor
	ItemDecoratorEnvironment

	// attribute
	ItemAttribute

	// defer
	ItemDefer

	// += and -=
	ItemAssignInc
	ItemAssignDec
)

func (ItemType) String

func (t ItemType) String() string

type Items

type Items []Item

func (Items) Print

func (i Items) Print()

Jump to

Keyboard shortcuts

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