From eec1f33c27e948cc90440c650ce0c24dee8d4a99 Mon Sep 17 00:00:00 2001 From: Robert Lowry Date: Wed, 4 Dec 2024 20:22:17 -0600 Subject: [PATCH] fix typos --- expr.go | 2 +- graph.go | 5 ++--- parser.go | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/expr.go b/expr.go index 968d8f8..de09276 100644 --- a/expr.go +++ b/expr.go @@ -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) } } diff --git a/graph.go b/graph.go index 40f1aee..c8801e6 100644 --- a/graph.go +++ b/graph.go @@ -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 { diff --git a/parser.go b/parser.go index ed05177..a16bdbd 100644 --- a/parser.go +++ b/parser.go @@ -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 }