Skip to content

Commit

Permalink
Tweak error format
Browse files Browse the repository at this point in the history
Minor tweak to the error format params.
  • Loading branch information
xllora authored Jan 9, 2017
1 parent 9e25c9b commit 5f9240e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bql/grammar/llk.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ func (l *LLk) Current() *lexer.Token {
// on creation.
func (l *LLk) Peek(k int) (*lexer.Token, error) {
if k > l.k {
return nil, fmt.Errorf("grammar.LLk: cannot look ahead %d beyond defined %d", k, l.k)
return nil, fmt.Errorf("grammar.LLk: cannot look ahead %v beyond defined %v", k, l.k)
}
if k <= 0 {
return nil, fmt.Errorf("grammar.LLk: invalid look ahead value %d", k)
return nil, fmt.Errorf("grammar.LLk: invalid look ahead value %v", k)
}
return &l.tkns[k], nil
}
Expand Down

0 comments on commit 5f9240e

Please sign in to comment.