From b68b7dcbb850b8c8c382f300726ad44c2bcee3aa Mon Sep 17 00:00:00 2001 From: Ethan Reesor Date: Tue, 13 Apr 2021 22:35:18 -0500 Subject: [PATCH] Spelling --- interp/interp.go | 8 ++++---- interp/interp_eval_test.go | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/interp/interp.go b/interp/interp.go index d0c8ff77a..60e6be381 100644 --- a/interp/interp.go +++ b/interp/interp.go @@ -132,7 +132,7 @@ type opt struct { stdout io.Writer // standard output stderr io.Writer // standard error - supressAssignmentResult bool + suppressAssignmentResult bool } // Interpreter contains global resources and state. @@ -247,7 +247,7 @@ type Options struct { Stdin io.Reader Stdout, Stderr io.Writer - SupressAssignmentResult bool + SuppressAssignmentResult bool } // New returns a new interpreter. @@ -299,7 +299,7 @@ func New(options Options) *Interpreter { // fastChan disables the cancellable version of channel operations in evalWithContext i.opt.fastChan, _ = strconv.ParseBool(os.Getenv("YAEGI_FAST_CHAN")) - i.opt.supressAssignmentResult = options.SupressAssignmentResult + i.opt.suppressAssignmentResult = options.SuppressAssignmentResult return &i } @@ -596,7 +596,7 @@ func (interp *Interpreter) eval(src, name string, inc bool) (res reflect.Value, interp.run(n, interp.frame) } - if interp.supressAssignmentResult { + if interp.suppressAssignmentResult { n := root for n.kind == blockStmt || n.kind == declStmt { n = n.lastChild() diff --git a/interp/interp_eval_test.go b/interp/interp_eval_test.go index 9153d361e..cada35aaa 100644 --- a/interp/interp_eval_test.go +++ b/interp/interp_eval_test.go @@ -1491,8 +1491,8 @@ func TestREPLDivision(t *testing.T) { } } -func TestEvalSupressAssignmentResult(t *testing.T) { - i := interp.New(interp.Options{SupressAssignmentResult: true}) +func TestEvalSuppressAssignmentResult(t *testing.T) { + i := interp.New(interp.Options{SuppressAssignmentResult: true}) runTests(t, i, []testCase{ {desc: "define", src: "a := 1", res: "{}"}, {desc: "define multiple", src: "a, b := 1, 2", res: "{}"},