Added separate Eval mode with option to isolate the environment
This allows for keeping variables isolated
This commit is contained in:
parent
2e8e60f904
commit
d8460f69bc
15 changed files with 176 additions and 58 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue