[jsinterp] Complying with PEP 479

This commit is contained in:
sulyi 2018-06-03 23:54:49 +02:00
parent d977e93070
commit 38b260228a
2 changed files with 2 additions and 4 deletions

View File

@ -16,8 +16,7 @@ class Parser(object):
def parse(self):
while not self.token_stream.ended:
yield self._source_element(self.stack_top)
raise StopIteration
def _source_element(self, stack_top):
if stack_top < 0:
raise ExtractorError('Recursion limit reached')

View File

@ -154,8 +154,7 @@ class TokenStream(object):
self.ended = True
else:
raise ExtractorError('Unrecognised sequence at %d' % pos)
raise StopIteration
def chk_id(self, last=False):
if last:
name, value, pos = self._last