Mercurial > hgrepos > Python > libs > pygments-lexer-pseudocode2
comparison pygments_lexer_pseudocode2/pseudocode.py @ 38:69522d4cafac
Remove another unneeded local variable
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Wed, 22 Apr 2026 16:27:35 +0200 |
| parents | d9a3551a1038 |
| children | a3151d837258 |
comparison
equal
deleted
inserted
replaced
| 37:c02d59f04133 | 38:69522d4cafac |
|---|---|
| 54 | 54 |
| 55 def op_translate(toktype): | 55 def op_translate(toktype): |
| 56 | 56 |
| 57 def _op_translate(lexer, match): | 57 def _op_translate(lexer, match): |
| 58 kw = match.group(1).upper() | 58 kw = match.group(1).upper() |
| 59 kwtrans = lexer.TRANSLATIONS.get(kw, kw) | 59 yield match.start(), toktype, lexer.TRANSLATIONS.get(kw, kw) |
| 60 yield match.start(), toktype, kwtrans | |
| 61 | 60 |
| 62 return _op_translate | 61 return _op_translate |
| 63 | 62 |
| 64 tokens = { | 63 tokens = { |
| 65 "root": [ | 64 "root": [ |
