about summary refs log tree commit diff
path: root/pkg/lang/parser/parser.go
diff options
context:
space:
mode:
authorMel <einebeere@gmail.com>2022-07-27 22:20:28 +0000
committerMel <einebeere@gmail.com>2022-07-27 22:50:42 +0000
commit4f23155ca7f8591cae0be6938610386513d24b7f (patch)
tree7a18b5297dc7d2a9304c802a429abf0869080a79 /pkg/lang/parser/parser.go
parentbe281507daf2d1d7f66f32daa42ef78daa48c5dd (diff)
downloadjinx-4f23155ca7f8591cae0be6938610386513d24b7f.tar.zst
jinx-4f23155ca7f8591cae0be6938610386513d24b7f.zip
Put correct token strings in parser errors
Diffstat (limited to 'pkg/lang/parser/parser.go')
-rw-r--r--pkg/lang/parser/parser.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/lang/parser/parser.go b/pkg/lang/parser/parser.go
index 1a9d1d0..0ff4b09 100644
--- a/pkg/lang/parser/parser.go
+++ b/pkg/lang/parser/parser.go
@@ -88,7 +88,7 @@ func (p *Parser) next() token.Token {
 func (p *Parser) expect(kind token.TokenKind) (token.Token, error) {
 	tok := p.next()
 	if tok.Kind != kind {
-		return token.Token{}, fmt.Errorf("expected %v, got %v", kind, tok.Kind)
+		return token.Token{}, fmt.Errorf("expected '%v', got '%v'", kind, tok.Kind)
 	}
 
 	return tok, nil