Dealing with deprecated next()

This commit is contained in:
Miroslav Stampar
2019-01-22 02:47:06 +01:00
parent 2c270ed250
commit 1adc66b763
13 changed files with 32 additions and 32 deletions

View File

@@ -897,7 +897,7 @@ class Parser:
def __init__(self, lexer):
self.lexer = lexer
self.lookahead = self.lexer.next()
self.lookahead = next(self.lexer)
def match(self, type):
if self.lookahead.type != type:
@@ -913,7 +913,7 @@ class Parser:
def consume(self):
token = self.lookahead
self.lookahead = self.lexer.next()
self.lookahead = next(self.lexer)
return token