MCPcopy
hub / github.com/google/mangle / EvalTransform

Function EvalTransform

engine/transformer.go:29–39  ·  view source on GitHub ↗

EvalTransform evaluates a transform.

(
	head ast.Atom,
	transform ast.Transform,
	input []ast.ConstSubstList,
	emit func(atom ast.Atom) bool)

Source from the content-addressed store, hash-verified

27
28// EvalTransform evaluates a transform.
29func EvalTransform(
30 head ast.Atom,
31 transform ast.Transform,
32 input []ast.ConstSubstList,
33 emit func(atom ast.Atom) bool) error {
34
35 if transform.IsLetTransform() {
36 return evalLet(head, transform, input, emit)
37 }
38 return evalDo(head, transform, input, emit)
39}
40
41// evalLet evaluates a let transform. This consists of a number of let statements,
42// each acting on a single row.

Callers 4

runEvalFunction · 0.85
evalMethod · 0.85
oneStepEvalClauseMethod · 0.85
evalMethod · 0.85

Calls 3

evalLetFunction · 0.85
evalDoFunction · 0.85
IsLetTransformMethod · 0.80

Tested by 1

runEvalFunction · 0.68