Skip to content

Commit

Permalink
refactor(parser): remove lookahead() function
Browse files Browse the repository at this point in the history
  • Loading branch information
xNaCly committed Apr 25, 2023
1 parent 8b26ea1 commit 0fb0d3e
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -596,21 +596,6 @@ func (p *Parser) match(types ...uint) bool {
return false
}

func (p *Parser) lookahead(types ...uint) bool {
i := p.current
for _, t := range types {
if p.isAtEnd() {
return false
}
if p.tokens[i].Kind != t {
return false
} else {
i++
}
}
return true
}

// checks if the current token.Kind maches the specified kind, returns false if at end or kind aren't the same
func (p *Parser) check(kind uint) bool {
if p.isAtEnd() {
Expand Down

0 comments on commit 0fb0d3e

Please sign in to comment.