engines

package
v6.5.12+incompatible Latest Latest
Warning

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

Go to latest
Published: May 20, 2022 License: Apache-2.0 Imports: 2 Imported by: 2

README

表达式执行引擎包

引擎必须实现AST包 github.com/zhuxiujia/GoMybatis/ast 下 ast.ExpressionEngine

type ExpressionEngine interface {
	//引擎名称
	Name() string
	//编译一个表达式
	//参数:lexerArg 表达式内容
	//返回:interface{} 编译结果,error 错误
	Lexer(lexerArg string) (interface{}, error)

	//执行一个表达式
	//参数:lexerResult=编译结果,arg=参数
	//返回:执行结果,错误
	Eval(lexerResult interface{}, arg interface{}, operation int) (interface{}, error)

    
	LexerAndEval(lexerArg string,arg interface{})  (interface{}, error)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExpressionEngineGoExpress

type ExpressionEngineGoExpress struct {
}

func (*ExpressionEngineGoExpress) Eval

func (it *ExpressionEngineGoExpress) Eval(lexerResult interface{}, arg interface{}, operation int) (interface{}, error)

执行一个表达式 参数:lexerResult=编译结果,arg=参数 返回:执行结果,错误

func (*ExpressionEngineGoExpress) Lexer

func (it *ExpressionEngineGoExpress) Lexer(expression string) (interface{}, error)

编译一个表达式 参数:lexerArg 表达式内容 返回:interface{} 编译结果,error 错误

func (*ExpressionEngineGoExpress) LexerAndEval

func (it *ExpressionEngineGoExpress) LexerAndEval(lexerArg string, arg interface{}) (interface{}, error)

func (*ExpressionEngineGoExpress) Name

func (it *ExpressionEngineGoExpress) Name() string

引擎名称

Jump to

Keyboard shortcuts

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