lexer

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Unlicense Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Lexer

type Lexer struct {
	// contains filtered or unexported fields
}

func NewLexer

func NewLexer(input string) *Lexer

func (*Lexer) NextToken

func (l *Lexer) NextToken() *Token

type Token

type Token struct {
	Type  TokenType
	Value string
}

type TokenType

type TokenType string
const (
	TokenEOF                TokenType = "eof"
	TokenKeyword            TokenType = "keyword"
	TokenComparison         TokenType = "comparison_operator"
	TokenLogical            TokenType = "logical_operator"
	TokenLiteralString      TokenType = "literal_string"
	TokenLiteralNumber      TokenType = "literal_number"
	TokenAssignmentOperator TokenType = "assignment_operator"
	TokenOpenBracket        TokenType = "open_bracket"
	TokenCloseBracket       TokenType = "close_bracket"
	TokenOpenParenthesis    TokenType = "open_parenthesis"
	TokenCloseParenthesis   TokenType = "close_parenthesis"
	TokenComma              TokenType = "comma"
	TokenAction             TokenType = "action"
	TokenDiscountType       TokenType = "discount_types"
	TokenUUID               TokenType = "uuid"
)

Jump to

Keyboard shortcuts

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