Skip to content

Commit

Permalink
fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
bobertlo committed Dec 5, 2024
1 parent be7a66e commit eec1f33
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion expr.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func flipDoubleNegatives(expr []token) []token {
func evaluateExpression(expr []token) (int, error) {
for _, tok := range expr {
if tok.typ == tokText || !tok.IsExpressionTerm() {
return 0, fmt.Errorf("unexpected token in expressoin: '%s'", tok)
return 0, fmt.Errorf("unexpected token in expression: '%s'", tok)
}
}

Expand Down
5 changes: 2 additions & 3 deletions graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ package gmars

import "slices"

// buildReferenceGraph takes a map of expresions and builds a map representing
// a graph of references where each key has a slice of symbols referenced by
// that symbol's tokens
// buildReferenceGraph takes a map of expressions and builds a graph of
// symbol references as a map[string][]token
func buildReferenceGraph(values map[string][]token) map[string][]string {
graph := make(map[string][]string)
for key, tokens := range values {
Expand Down
2 changes: 1 addition & 1 deletion parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ func parsePseudoOp(p *parser) parseStateFn {
p.lines = append(p.lines, p.currentLine)
return parseLine
}
p.err = fmt.Errorf("line %d: expected operand expression after psuedo-op '%s', got newline", p.line, lastToken.val)
p.err = fmt.Errorf("line %d: expected operand expression after pseudo-op '%s', got newline", p.line, lastToken.val)
return nil
}

Expand Down

0 comments on commit eec1f33

Please sign in to comment.