executor

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Executor

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

func NewExecutor

func NewExecutor(debugger *debugger.Debugger) *Executor

func (*Executor) Execute

func (e *Executor) Execute(expression string, precision int32) (string, error)

type ExprError

type ExprError struct {
	Message string
	Loc     Location
}

func NewExprError added in v0.3.0

func NewExprError(text string, loc Location) *ExprError

func (*ExprError) Error

func (e *ExprError) Error() string

type Identifier added in v0.3.0

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

type Location

type Location struct {
	Start int
	End   int
}

func (Location) Size

func (l Location) Size() int

type Operator

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

type Token

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

func (Token) String

func (t Token) String() string

type TokenKind

type TokenKind string
const (
	KindNumber     TokenKind = "number"     // `123`, `1.12`, `12`, `1_2_3`
	KindOperator   TokenKind = "operator"   // `+`, `-`, `//`, `(`
	KindIdentifier TokenKind = "identifier" // `abc`, `a12`, `a_b_1`
)

Jump to

Keyboard shortcuts

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