Documentation
¶
Overview ¶
Package function provides the Function type and related methods.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeprecationInfo ¶
DeprecationInfo defines the information for a deprecation.
type Documentation ¶
type Documentation struct {
Name string
Description string
Since string
DeprecationInfo DeprecationInfo
Examples []string
}
Documentation defines the documentation for a function.
type EvaluatorInterface ¶
EvaluatorInterface defines the interface that functions need from the evaluator.
type Info ¶
type Info struct {
Documentation Documentation
PackageName string
Handler Handler
FunctionType Type
Parameters []ArgInfo
ReturnValues []ArgInfo
IsBuiltin bool
}
Info defines the information for a function.
func MakeFunction ¶
func MakeFunction( documentation Documentation, packageName string, functionType Type, parameters []ArgInfo, returnValues []ArgInfo, isBuiltin bool, impl func(e EvaluatorInterface, args []datavalue.Value) datavalue.Value, ) Info
MakeFunction creates a new function definition.
type PackageInfo ¶
PackageInfo defines the information for a package.
type Type ¶
type Type int
Type defines the type of function.
const ( // FunctionTypeFixed defines function with a fixed number of arguments. FunctionTypeFixed Type = iota // FunctionTypeVariadic defines function with a variadic number of arguments. FunctionTypeVariadic // FunctionTypeMixedVariadic defines function with a mixed number of arguments. FunctionTypeMixedVariadic )
Click to show internal directories.
Click to hide internal directories.