// Copyright (c) 2024-2026 Celestino Amoroso (celestino.amoroso@gmail.com). // All rights reserved. // term.go package kern import ( "fmt" ) type Term interface { fmt.Stringer // Children() []Term Source() string GetChildCount() (count int) GetChild(index int) Term GetChildSource(index int) string GetLeftChild() (c Term) GetRightChild() (c Term) IsAssign() bool IsVar() bool Compute(ctx ExprContext) (result any, err error) EvalInfix(ctx ExprContext) (leftValue, rightValue any, err error) Errorf(template string, args ...any) (err error) ErrIncompatibleTypes(leftValue, rightValue any) error }