Mercurial > hgrepos > Python > libs > pygments-lexer-pseudocode2
comparison pygments_lexer_pseudocode2/lexers/algpseudocode.py @ 283:5eba722df93e
FIX: Some missing context position updates if a context is given
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Wed, 20 May 2026 17:31:20 +0200 |
| parents | 90946f87d77d |
| children | afbca50b7dc1 |
comparison
equal
deleted
inserted
replaced
| 282:90946f87d77d | 283:5eba722df93e |
|---|---|
| 201 | 201 |
| 202 return _op_opt_ignore_or_fixed | 202 return _op_opt_ignore_or_fixed |
| 203 | 203 |
| 204 def op_gets(lexer, match, ctx=None): | 204 def op_gets(lexer, match, ctx=None): |
| 205 yield match.start(), Operator, lexer.symbol_gets | 205 yield match.start(), Operator, lexer.symbol_gets |
| 206 if ctx: | |
| 207 ctx.pos = match.end() | |
| 206 | 208 |
| 207 def op_remark(lexer, match, ctx=None): | 209 def op_remark(lexer, match, ctx=None): |
| 208 yield match.start(), Comment.Single, lexer.symbol_remark | 210 yield match.start(), Comment.Single, lexer.symbol_remark |
| 211 if ctx: | |
| 212 ctx.pos = match.end() | |
| 209 | 213 |
| 210 def op_symbol(toktype): | 214 def op_symbol(toktype): |
| 211 | 215 |
| 212 def _op_symbol(lexer, match, ctx=None): | 216 def _op_symbol(lexer, match, ctx=None): |
| 213 kw = match.group().upper() | 217 kw = match.group().upper() |
