comparison pygments_lexer_pseudocode2/algpseudocode.py @ 106:f6b46a379aba

The "\ENSURE" command
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 04 May 2026 16:40:13 +0200
parents cec52d83869a
children 6cebd3e7bc97
comparison
equal deleted inserted replaced
105:cec52d83869a 106:f6b46a379aba
65 "INPUT": "Input:", 65 "INPUT": "Input:",
66 "INPUTS": "Inputs:", 66 "INPUTS": "Inputs:",
67 "OUTPUT": "Output:", 67 "OUTPUT": "Output:",
68 "OUTPUTS": "Outputs:", 68 "OUTPUTS": "Outputs:",
69 "RETURNS": "Returns:", 69 "RETURNS": "Returns:",
70 "ENSURE": "Ensure:",
70 "IS": "IS", 71 "IS": "IS",
71 "WITH": "WITH", 72 "WITH": "WITH",
72 "IF": "IF", 73 "IF": "IF",
73 "THEN": "THEN", 74 "THEN": "THEN",
74 "ELSE": "ELSE", 75 "ELSE": "ELSE",
232 bygroups(op_symbol(Text), LexBase.op_fixed(Whitespace, " ")), 233 bygroups(op_symbol(Text), LexBase.op_fixed(Whitespace, " ")),
233 "text-statement"), 234 "text-statement"),
234 (r"(?i)\\(" 235 (r"(?i)\\("
235 r"(?:input(?:s)?)" 236 r"(?:input(?:s)?)"
236 r"|(?:output(?:s)?)" 237 r"|(?:output(?:s)?)"
238 r"|(?:ensure)"
237 r"|(?:returns)" 239 r"|(?:returns)"
238 r")[ \t]*(\{)", 240 r")[ \t]*(\{)",
239 bygroups(op_translate(Keyword), 241 bygroups(op_translate(Keyword),
240 LexBase.op_fixed(Whitespace, " ")), 242 LexBase.op_fixed(Whitespace, " ")),
241 "text-statement"), 243 "text-statement"),