Added separate Eval mode with option to isolate the environment

This allows for keeping variables isolated
This commit is contained in:
Leon Mika 2025-05-25 09:50:25 +10:00
parent 2e8e60f904
commit d8460f69bc
15 changed files with 176 additions and 58 deletions

View file

@ -14,7 +14,7 @@ import (
type NoResults struct{}
func (r *REPL) EvalAndDisplay(ctx context.Context, expr string) error {
res, err := r.inst.Eval(ctx, expr)
res, err := r.inst.EvalString(ctx, expr)
if err != nil {
if errors.Is(err, ucl.ErrNotConvertable) {
return nil