diff options
author | Miro Hron?ok <miro@hroncok.cz> | 2018-07-04 18:08:48 +0200 |
---|---|---|
committer | Miro Hron?ok <miro@hroncok.cz> | 2018-07-04 18:08:48 +0200 |
commit | 1d494b833009cccce7eabe0635786e688d79c93f (patch) | |
tree | 3fa5aac9afbdb1ffae60f126b5c065199f83b877 /pygments/lexers/lisp.py | |
parent | 1b966038502c0b386a6645d4b5125f623d0947bb (diff) | |
download | pygments-git-1d494b833009cccce7eabe0635786e688d79c93f.tar.gz |
PEP 479: Raising StopIteration from a generator is now an error
So we return instead. Fix needed for Python 3.7.
Fixes https://bitbucket.org/birkenfeld/pygments-main/issues/1457
Diffstat (limited to 'pygments/lexers/lisp.py')
-rw-r--r-- | pygments/lexers/lisp.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pygments/lexers/lisp.py b/pygments/lexers/lisp.py index e258c347..258916df 100644 --- a/pygments/lexers/lisp.py +++ b/pygments/lexers/lisp.py @@ -2327,13 +2327,13 @@ class ShenLexer(RegexLexer): token = Name.Function if token == Literal else token yield index, token, value - raise StopIteration + return def _process_signature(self, tokens): for index, token, value in tokens: if token == Literal and value == '}': yield index, Punctuation, value - raise StopIteration + return elif token in (Literal, Name.Function): token = Name.Variable if value.istitle() else Keyword.Type yield index, token, value |