comparison pygments_lexer_pseudocode2/__init__.py @ 20:3db60b64abf6

Allow also "!=" as inequality operator (in addition to "<>")
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 20 Apr 2026 15:28:19 +0200
parents 2e67c4eae6d9
children 5705ac8a4fd5
comparison
equal deleted inserted replaced
19:2e67c4eae6d9 20:3db60b64abf6
38 38
39 REPLACEMENTS = { 39 REPLACEMENTS = {
40 '<=': '≤', 40 '<=': '≤',
41 '>=': '≥', 41 '>=': '≥',
42 '<>': '≠', 42 '<>': '≠',
43 '!=': '≠',
43 '<-': '←', 44 '<-': '←',
44 '^': '↑', 45 '^': '↑',
45 } 46 }
46 47
47 def op_replace(lexer, match): 48 def op_replace(lexer, match):
89 90
90 (r'\b(vrai|faux|nil)\s*\b', 91 (r'\b(vrai|faux|nil)\s*\b',
91 Name.Constant), 92 Name.Constant),
92 93
93 # Operators 94 # Operators
94 (r'(<=|>=|<>|<-|\^|\*|\+|-|\/|<|>|=|\\\\|mod|←|↑|≤|≥|≠|÷|×|\.\.|\[|\]|\.|non|xou|et|ou)', 95 (r'(<=|>=|<>|!=|<-|\^|\*|\+|-|\/|<|>|=|\\\\|mod|←|↑|≤|≥|≠|÷|×|\.\.|\[|\]|\.|non|xou|et|ou)',
95 op_replace), 96 op_replace),
96 97
97 (r'(\(|\)|\,|\;|:)', 98 (r'(\(|\)|\,|\;|:)',
98 Punctuation), 99 Punctuation),
99 100