Fix eofToken access in ListTokenSource.nextToken() by Python targets.

At the end of the nextToken() function, setting the eofToken field was
attempted without the 'self' keyword, resulting in accessing
and setting a new local and unused variable. The patch supplements
the missing 'self' keywords for both targets.
This commit is contained in:
Renata Hodovan 2016-08-09 15:19:43 +02:00
parent 47e268dfea
commit 510e21d7cb
2 changed files with 2 additions and 2 deletions

View File

@ -81,7 +81,7 @@ class ListTokenSource(TokenSource):
return self.eofToken
t = self.tokens[self.pos]
if self.pos == len(self.tokens) - 1 and t.type == Token.EOF:
eofToken = t
self.eofToken = t
self.pos += 1
return t

View File

@ -81,7 +81,7 @@ class ListTokenSource(TokenSource):
return self.eofToken
t = self.tokens[self.pos]
if self.pos == len(self.tokens) - 1 and t.type == Token.EOF:
eofToken = t
self.eofToken = t
self.pos += 1
return t