diff options
author | Georg Brandl <georg@python.org> | 2020-09-06 14:35:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-06 14:35:14 +0200 |
commit | 40baa94a6bf0c62be8c8b03a942116869ce80128 (patch) | |
tree | 50eca3f33e60a4bbadd29bf566b294052e509259 /pygments/lexers/php.py | |
parent | ed93a2758bdfbeaafc43ac59a611bf2cff92b55c (diff) | |
download | pygments-git-40baa94a6bf0c62be8c8b03a942116869ce80128.tar.gz |
all: use yield from (#1537)
Diffstat (limited to 'pygments/lexers/php.py')
-rw-r--r-- | pygments/lexers/php.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/pygments/lexers/php.py b/pygments/lexers/php.py index 1dd3c52b..2bad339a 100644 --- a/pygments/lexers/php.py +++ b/pygments/lexers/php.py @@ -126,16 +126,14 @@ class PsyshConsoleLexer(Lexer): curcode += line[3:] else: if curcode: - for item in do_insertions( - insertions, phplexer.get_tokens_unprocessed(curcode)): - yield item + yield from do_insertions( + insertions, phplexer.get_tokens_unprocessed(curcode)) curcode = '' insertions = [] yield match.start(), Generic.Output, line if curcode: - for item in do_insertions(insertions, - phplexer.get_tokens_unprocessed(curcode)): - yield item + yield from do_insertions(insertions, + phplexer.get_tokens_unprocessed(curcode)) class PhpLexer(RegexLexer): |