evaluator

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// operations
	GET     = "GET"
	SET     = "SET"
	INC     = "INC"
	DEC     = "DEC"
	NEGATE  = "NEGATE"
	LAPPEND = "LAPPEND"
	LREMOVE = "LREMOVE"
	REMOVE  = "REMOVE"

	// parameters
	TTL = "ttl"

	// type values
	STRING = "STRING"
	LIST   = "LIST"
	INT    = "INT"
	EOF    = "EOF"

	// identifier
	COMMAND = "COMMAND"
	ID      = "ID"
	ILLEGAL = "ILLEGAL"
)

Variables

This section is empty.

Functions

func FormatError

func FormatError(errtype string, err string) string

func FormatString

func FormatString(value string) string

Types

type Evaluation

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

type Evaluator

type Evaluator struct {
	store.Store
	// contains filtered or unexported fields
}

func NewEvaluator

func NewEvaluator(s store.Store, l *zap.SugaredLogger) *Evaluator

func (*Evaluator) Evaluate

func (e *Evaluator) Evaluate(cmd string) (string, error)

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
	Literal string
}

func NewToken

func NewToken(t TokenType, l string) Token

type TokenType

type TokenType string

Jump to

Keyboard shortcuts

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