Skip to content

Commit

Permalink
Spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
firelizzard18 committed Apr 14, 2021
1 parent 7b8eb13 commit b68b7dc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions interp/interp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -247,7 +247,7 @@ type Options struct {
Stdin io.Reader
Stdout, Stderr io.Writer

SupressAssignmentResult bool
SuppressAssignmentResult bool
}

// New returns a new interpreter.
Expand Down Expand Up @@ -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
}

Expand Down Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions interp/interp_eval_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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: "{}"},
Expand Down

0 comments on commit b68b7dc

Please sign in to comment.