internal

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const AND = 57351
View Source
const BIT_NOT = 57361
View Source
const BitSizeOfInt = int(unsafe.Sizeof(0)) * 8
View Source
const EQL = 57353
View Source
const GEQ = 57358
View Source
const GTR = 57356
View Source
const IDENT = 57350
View Source
const IN = 57362
View Source
const LEQ = 57357
View Source
const LITERAL_BOOL = 57347
View Source
const LITERAL_NIL = 57346
View Source
const LITERAL_NUMBER = 57348
View Source
const LITERAL_STRING = 57349
View Source
const LSS = 57355
View Source
const NEQ = 57354
View Source
const OR = 57352
View Source
const SHL = 57359
View Source
const SHR = 57360

Variables

This section is empty.

Functions

func Evaluate

func Evaluate(str string, variables map[string]interface{}, functions map[string]ExpressionFunction) (result interface{}, err error)

Types

type ExpressionFunction

type ExpressionFunction = func(args ...interface{}) (interface{}, error)

ExpressionFunction can be called from within expressions. The returned object needs to have one of the following types: `nil`, `bool`, `int`, `float64`, `[]interface{}` or `map[string]interface{}`.

type Lexer

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

func NewLexer

func NewLexer(src string, variables map[string]interface{}, functions map[string]ExpressionFunction) *Lexer

func (*Lexer) Error

func (l *Lexer) Error(e string)

func (*Lexer) Lex

func (l *Lexer) Lex(lval *yySymType) int

func (*Lexer) Perrorf

func (l *Lexer) Perrorf(pos token.Pos, format string, a ...interface{})

func (*Lexer) Result

func (l *Lexer) Result() interface{}

type Token

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

Jump to

Keyboard shortcuts

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