Mercurial > hgrepos > Python > libs > pygments-lexer-pseudocode2
diff pygments_lexer_pseudocode2/algpseudocode.py @ 149:380d2607d5c7
Implement the "\NAME" command.
Implemented just as \CALL it is better named for just highlighting entity names
properly. \CALL suggests a function or procedure call.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Thu, 07 May 2026 15:49:13 +0200 |
| parents | f916251d5647 |
| children | 4ee0b1536ea6 |
line wrap: on
line diff
--- a/pygments_lexer_pseudocode2/algpseudocode.py Thu May 07 14:35:48 2026 +0200 +++ b/pygments_lexer_pseudocode2/algpseudocode.py Thu May 07 15:49:13 2026 +0200 @@ -361,7 +361,7 @@ include("escaped-string-start"), include("py-strings"), include("py-numbers"), - (r"(?i)\\call[ \t]*(\{)", LexBase.op_ignore, "entity-name"), + (r"(?i)\\(call|name)[ \t]*(\{)", LexBase.op_ignore, "entity-name"), (r"(?i)\\gets\b", op_gets), (r"(?i)\\text[ \t]*\{", LexBase.op_ignore, "text-in-expr"), include("explicit-tokentype"), @@ -378,7 +378,7 @@ include("escaped-string-start"), include("py-strings"), include("py-numbers"), - (r"(?i)\\call[ \t]*(\{)", LexBase.op_ignore, "entity-name"), + (r"(?i)\\(call|name)[ \t]*(\{)", LexBase.op_ignore, "entity-name"), (r"(?i)\\gets\b", op_gets), (r"(?i)\\text[ \t]*\{", LexBase.op_ignore, "text-in-expr"), include("explicit-tokentype"),
