Skip to content

Commit

Permalink
fix: misspell
Browse files Browse the repository at this point in the history
  • Loading branch information
muktihari committed Jul 2, 2024
1 parent c2be744 commit a8a7f8a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions exp/explain/explain.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
// One step can have multiple equivalent forms, starts with original form until the final form.
type Step struct {
EquivalentForms []string
Explaination string
Explanation string
Result string
}

Expand All @@ -43,7 +43,7 @@ func Explain(s string) ([]Step, error) {
for _, transform := range v.transforms {
step := Step{
EquivalentForms: []string{transform.Segmented},
Explaination: transform.Explaination,
Explanation: transform.Explanation,
Result: transform.Evaluated,
}
if transform.Segmented != transform.EquivalentForm {
Expand Down
6 changes: 3 additions & 3 deletions exp/explain/visitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const (
type Transform struct {
Segmented string
EquivalentForm string
Explaination string
Explanation string
Evaluated string
}

Expand Down Expand Up @@ -212,7 +212,7 @@ func explainBitwise(transform *Transform, xValue, yValue string, op token.Token)
ybits := fmt.Sprintf(formatter, int64(fy))

if op != token.SHL && op != token.SHR {
transform.Explaination = fmt.Sprintf("%s\n%s\n%s %s\n%s",
transform.Explanation = fmt.Sprintf("%s\n%s\n%s %s\n%s",
xbits, ybits,
strings.Repeat("-", (size*2)-(size*2/10)), operatorStringMap[op],
fmt.Sprintf(formatter, result))
Expand All @@ -229,6 +229,6 @@ func explainBitwise(transform *Transform, xValue, yValue string, op token.Token)
result = int64(fx) >> int64(fy)
}

transform.Explaination = fmt.Sprintf("%s %s-shifted by %d = %s",
transform.Explanation = fmt.Sprintf("%s %s-shifted by %d = %s",
xbits, shiftDirection, int64(fy), fmt.Sprintf(formatter, result))
}
4 changes: 2 additions & 2 deletions exp/explain/visitor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ func TestVisit(t *testing.T) {

transforms := v.Value()

// Ignore Explaination
// Ignore Explanation
for i := range transforms {
transforms[i].Explaination = ""
transforms[i].Explanation = ""
}

if diff := cmp.Diff(transforms, tc.transforms); diff != "" {
Expand Down

0 comments on commit a8a7f8a

Please sign in to comment.