No need to create extra variable
This commit is contained in:
parent
b5da299ea3
commit
e0bcd5ff37
1 changed files with 1 additions and 1 deletions
|
@ -176,7 +176,7 @@ func (p *parser) shouldBe(expected ...Token) (tok Token, lit string, err error)
|
|||
|
||||
tok, lit, _ = p.scan()
|
||||
|
||||
if found := p.in(tok, expected); !found {
|
||||
if !p.in(tok, expected) {
|
||||
p.unscan()
|
||||
err = &ParseError{Found: lit, Expected: lookup(expected)}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue