token

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

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

	IDENT = "IDENT"

	COMMA = "COMMA"

	LBRACE = "LBRACE"
	RBRACE = "RBRACE"

	LPAREN = "LPAREN"
	RPAREN = "RPAREN"

	ASSIGN = "ASSIGN"
	SIGN   = "SIGN"
	HASH   = "HASH"
	DOT    = "DOT"

	NEWLINE = "NEWLINE"

	ENTITY   = "ENTITY"
	RELATION = "RELATION"
	ACTION   = "ACTION"

	NOT = "NOT"

	AND = "AND"
	OR  = "OR"

	SINGLE_LINE_COMMENT = "SINGLE_LINE_COMMENT"
	MULTI_LINE_COMMENT  = "MULTI_LINE_COMMENT"
	SPACE               = "SPACE"
	TAB                 = "TAB"
)

Variables

This section is empty.

Functions

func IsIgnores added in v0.3.1

func IsIgnores(typ Type) bool

IsIgnores -

Types

type Token

type Token struct {
	Type    Type
	Literal string
}

Token -

func New

func New(typ Type, ch byte) Token

New -

type Type

type Type string

Type -

func LookupKeywords

func LookupKeywords(ident string) Type

LookupKeywords -

func (Type) String

func (t Type) String() string

String -

type WithIgnores added in v0.3.1

type WithIgnores struct {
	Token   Token
	Ignores []Token
}

WithIgnores -

Jump to

Keyboard shortcuts

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