token

package
v0.0.0-...-f5aabfc Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2021 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Token

type Token struct {
	Type    Type
	Literal string
}

Token represents lexical token

func TokenMap

func TokenMap(t string) Token

TokenMap ..

type Type

type Type string

Type represents Token Type

const (
	ILLEGAL  Type = "-1"
	EOF      Type = "0"
	IDENT    Type = "ident"
	STRING   Type = "string"
	NUM      Type = "num"
	SQUOTE   Type = "'"
	DQUOTE   Type = "\""
	ASTERISK Type = "*"
	DOT      Type = "."
	COMMA    Type = ","
	COLON    Type = ":"
	DCOLON   Type = "::"
	LPAREN   Type = "("
	RPAREN   Type = ")"
	LBRACKET Type = "["
	RBRACKET Type = "]"
	VBAR     Type = "|"
	PLUS     Type = "+"
	MINUS    Type = "-"
	GT       Type = ">"
	EQ       Type = "="
	TILDE    Type = "~"
	S        Type = "w"

	INCLUDES       Type = "~="
	DASHMATCH      Type = "|="
	PREFIXMATCH    Type = "^="
	SUFFIXMATCH    Type = "$="
	SUBSTRINGMATCH Type = "*="
	ATKEYWORD      Type = "@{ident}"
	HASH           Type = "#{name}"
	FUNCTION       Type = "{ident}("
)

Token Types

Jump to

Keyboard shortcuts

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