Skip to content

Commit

Permalink
Fix error message typo
Browse files Browse the repository at this point in the history
  • Loading branch information
huderlem committed Sep 7, 2020
1 parent 3771070 commit 0f9ce32
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ func (p *Parser) parseFormatStringOperator() (string, error) {
setFontID = true
}
} else {
return "", fmt.Errorf("line %d: invalid format() parameter '%s'. Expected eighter fontId (string) or maxLineLength (integer)", p.peekToken.LineNumber, p.peekToken.Literal)
return "", fmt.Errorf("line %d: invalid format() parameter '%s'. Expected either fontId (string) or maxLineLength (integer)", p.peekToken.LineNumber, p.peekToken.Literal)
}
}
if err := p.expectPeek(token.RPAREN); err != nil {
Expand Down
4 changes: 2 additions & 2 deletions parser/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1529,7 +1529,7 @@ text Foo {
text Foo {
format("Hi", )
}`,
expectedError: "line 3: invalid format() parameter ')'. Expected eighter fontId (string) or maxLineLength (integer)",
expectedError: "line 3: invalid format() parameter ')'. Expected either fontId (string) or maxLineLength (integer)",
},
{
input: `
Expand Down Expand Up @@ -1557,7 +1557,7 @@ text Foo {
script Foo {
msgbox(format("Hi", ))
}`,
expectedError: "line 3: invalid format() parameter ')'. Expected eighter fontId (string) or maxLineLength (integer)",
expectedError: "line 3: invalid format() parameter ')'. Expected either fontId (string) or maxLineLength (integer)",
},
{
input: `
Expand Down

0 comments on commit 0f9ce32

Please sign in to comment.