comparison pygments_lexer_pseudocode2/__init__.py @ 23:bb2fd6d4ad69

More arrows
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 20 Apr 2026 23:28:27 +0200
parents b42168cc9884
children f13f5ddafcf6
comparison
equal deleted inserted replaced
22:b42168cc9884 23:bb2fd6d4ad69
42 '<>': '≠', 42 '<>': '≠',
43 '!=': '≠', 43 '!=': '≠',
44 '<-': '←', 44 '<-': '←',
45 '->': '→', 45 '->': '→',
46 '=>': '⇒', 46 '=>': '⇒',
47 '<->': '↔',
48 '<=>': '⇔',
47 '^': '↑', 49 '^': '↑',
48 } 50 }
49 51
50 def op_replace(lexer, match): 52 def op_replace(lexer, match):
51 op = match.group(0) 53 op = match.group(0)
92 94
93 (r'\b(vrai|faux|nil)\s*\b', 95 (r'\b(vrai|faux|nil)\s*\b',
94 Name.Constant), 96 Name.Constant),
95 97
96 # Operators 98 # Operators
97 (r'(<=|>=|<>|!=|<-|->|=>|\^|\*|\+|-|\/|<|>|=|\\\\|mod|←|↑|≤|≥|≠|÷|×|\.\.|\[|\]|\.|non|xou|et|ou)', 99 (r'(<->|<=>|<=|>=|<>|!=|<-|->|=>|\^|\*|\+|-|\/|<|>|=|\\\\|mod|←|↑|≤|≥|≠|÷|×|\.\.|\[|\]|\.|non|xou|et|ou)',
98 op_replace), 100 op_replace),
99 101
100 (r'(\(|\)|\,|\;|:)', 102 (r'(\(|\)|\,|\;|:)',
101 Punctuation), 103 Punctuation),
102 104
111 113
112 'strings': [ 114 'strings': [
113 (r'"([^"])*"', String.Double), 115 (r'"([^"])*"', String.Double),
114 (r"'([^'])*'", String.Single), 116 (r"'([^'])*'", String.Single),
115 ], 117 ],
116 # 118 #
117 # This is stolen from the Pygment's Python lexer. 119 # This is stolen from the Pygment's Python lexer.
118 # 120 #
119 # SPDX-SnippetBegin 121 # SPDX-SnippetBegin
120 # SPDX-License-Identifier: BSD-2-Clause 122 # SPDX-License-Identifier: BSD-2-Clause
121 # SPDX-SnippetCopyrightText: Copyright 2006-2023 by the Pygments team 123 # SPDX-SnippetCopyrightText: Copyright 2006-2023 by the Pygments team