Mercurial > hgrepos > Python > libs > pygments-lexer-pseudocode2
changeset 93:84c0f761c836
Renamed "text-operators" to "word-operators" and allow more case-variants
E.g. AND, And, and.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Sun, 03 May 2026 15:10:52 +0200 |
| parents | 3f37832c405d |
| children | dc17b778a52b |
| files | pygments_lexer_pseudocode2/algpseudocode.py |
| diffstat | 1 files changed, 9 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/pygments_lexer_pseudocode2/algpseudocode.py Sun May 03 13:59:16 2026 +0200 +++ b/pygments_lexer_pseudocode2/algpseudocode.py Sun May 03 15:10:52 2026 +0200 @@ -259,7 +259,7 @@ include("explicit-tokentype"), include("remark"), include("keyword-constants"), - include("text-operators"), + include("word-operators"), include("math-builtins"), include("py-name"), ], @@ -271,7 +271,7 @@ include("explicit-tokentype"), include("remark"), include("keyword-constants"), - include("text-operators"), + include("word-operators"), include("math-builtins"), include("py-name"), ], @@ -315,8 +315,13 @@ suffix=r"\b"), Name.Builtin), ], - "text-operators": [ - (words(("in", "is", "and", "or", "xor", "not"), + "word-operators": [ + (words(("IN", "In", "in", + "IS", "Is", "is", + "AND", "And", "and", + "OR", "Or", "or", + "XOR", "Xor", "xor", + "NOT", "Not", "not"), prefix=r"(?<!\.)", suffix=r"\b"), Operator.Word),
