parser

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrLogger

type ErrLogger interface {
	Errorf(pos gotoken.Position, msg string, args ...any)
}

type Token

type Token struct {
	Type TokenType
	Str  string
	Pos  gotoken.Pos
}

type TokenType

type TokenType int
const (
	EOF                 TokenType = 0
	ERROR               TokenType = 1
	INFO                TokenType = 2
	PARAM               TokenType = 3
	FLAG                TokenType = 4
	AND                 TokenType = 5
	BREAK               TokenType = 6
	CATCH               TokenType = 7
	CONTINUE            TokenType = 8
	DEFER               TokenType = 9
	ELSE                TokenType = 10
	FALSE               TokenType = 11
	FOR                 TokenType = 12
	FUNC                TokenType = 13
	IF                  TokenType = 14
	IMPORT              TokenType = 15
	NIL                 TokenType = 16
	NOT                 TokenType = 17
	OR                  TokenType = 18
	RETURN              TokenType = 19
	THROW               TokenType = 20
	TRUE                TokenType = 21
	TRY                 TokenType = 22
	VAR                 TokenType = 23
	WHILE               TokenType = 24
	YIELD               TokenType = 25
	ASSIGN              TokenType = 26
	ASSIGN_ADD          TokenType = 27
	ASSIGN_SUB          TokenType = 28
	ASSIGN_MUL          TokenType = 29
	ASSIGN_DIV          TokenType = 30
	ASSIGN_MOD          TokenType = 31
	EQ                  TokenType = 32
	NE                  TokenType = 33
	LT                  TokenType = 34
	LE                  TokenType = 35
	GT                  TokenType = 36
	GE                  TokenType = 37
	ADD                 TokenType = 38
	SUB                 TokenType = 39
	MUL                 TokenType = 40
	DIV                 TokenType = 41
	MOD                 TokenType = 42
	INC                 TokenType = 43
	DEC                 TokenType = 44
	QUESTION_MARK       TokenType = 45
	SEMICOLON           TokenType = 46
	COMMA               TokenType = 47
	COLON               TokenType = 48
	PERIOD              TokenType = 49
	OPAREN              TokenType = 50
	CPAREN              TokenType = 51
	OBRACKET            TokenType = 52
	CBRACKET            TokenType = 53
	OCURLY              TokenType = 54
	CCURLY              TokenType = 55
	ARROW               TokenType = 56
	LAMBDA              TokenType = 57
	PIPE                TokenType = 58
	EXPAND              TokenType = 59
	BACKTICK            TokenType = 60
	NUMBER              TokenType = 61
	STRING              TokenType = 62
	ID                  TokenType = 63
	REGEX               TokenType = 64
	NEWLINE             TokenType = 65
	CHAR                TokenType = 66
	EXEC_PREFIX         TokenType = 67
	EXEC_LITERAL        TokenType = 68
	EXEC_DQUOTE_LITERAL TokenType = 69
	EXEC_SQUOTE_LITERAL TokenType = 70
	EXEC_WS             TokenType = 71
	EXEC_HOME           TokenType = 72
)

func (TokenType) String

func (t TokenType) String() string

Jump to

Keyboard shortcuts

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