Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Eval ¶ added in v0.3.0
func Eval(root *ast.Expression, env Environment) object.Object
Eval evaluates the AST and returns the result of the evaluation. In case of a runtime error, the resulting object will be an error object.
func Parse ¶ added in v0.3.0
func Parse(input string) (*ast.Expression, error)
Parse parses the input string and returns the root node of the AST. In case of syntax errors, it returns an error.
func Preprocess ¶ added in v0.3.0
func Preprocess(ctx context.Context, root *ast.Expression, expander ast.Expander) (*ast.Expression, error)
Preprocess preprocesses the AST using the expander and returns the root node of the new AST.
Types ¶
type Environment ¶
type Environment = env.Environment
type Metadata ¶
func ExtractMetadata ¶ added in v0.3.0
func ExtractMetadata(root *ast.Expression) (Metadata, error)
ExtractMetadata extracts metadata from the given expression.
Click to show internal directories.
Click to hide internal directories.