evaluator

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2025 License: EUPL-1.2 Imports: 25 Imported by: 0

Documentation

Overview

Package evaluator interprets and evaluates the AST.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EvaluateBlock

func EvaluateBlock(ctx context.Context, port Port, rtConfig config.Config, block *sx.Pair) *sx.Pair

EvaluateBlock evaluates the given block list in the given context, with the given ports, and the given environment.

func EvaluateZettel

func EvaluateZettel(ctx context.Context, port Port, rtConfig config.Config, zn *ast.Zettel)

EvaluateZettel evaluates the given zettel in the given context, with the given ports, and the given environment.

func QueryAction

func QueryAction(ctx context.Context, q *query.Query, ml []*meta.Meta) (*sx.Pair, int)

QueryAction transforms a list of metadata according to query actions into a SZ nested list.

Types

type Port

type Port interface {
	GetZettel(context.Context, id.Zid) (zettel.Zettel, error)
	QueryMeta(ctx context.Context, q *query.Query) ([]*meta.Meta, error)
}

Port contains all methods to retrieve zettel (or part of it) to evaluate a zettel.

Jump to

Keyboard shortcuts

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