comparison pygments_lexer_pseudocode2/algpseudocode.py @ 124:f916251d5647

Implement the "\REQUIRE" command from algpseudocodex
author Franz Glasner <fzglas.hg@dom66.de>
date Wed, 06 May 2026 16:12:17 +0200
parents 4d96ace53ba1
children 380d2607d5c7
comparison
equal deleted inserted replaced
123:4d96ace53ba1 124:f916251d5647
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 "ENSURE": "Ensure:",
71 "REQUIRE": "Require:",
71 "IS": "IS", 72 "IS": "IS",
72 "WITH": "WITH", 73 "WITH": "WITH",
73 "IF": "IF", 74 "IF": "IF",
74 "THEN": "THEN", 75 "THEN": "THEN",
75 "ELSE": "ELSE", 76 "ELSE": "ELSE",
250 "text-statement"), 251 "text-statement"),
251 (r"(?i)\\(" 252 (r"(?i)\\("
252 r"(?:input(?:s)?)" 253 r"(?:input(?:s)?)"
253 r"|(?:output(?:s)?)" 254 r"|(?:output(?:s)?)"
254 r"|(?:ensure)" 255 r"|(?:ensure)"
256 r"|(?:require)"
255 r"|(?:returns)" 257 r"|(?:returns)"
256 r")[ \t]*(\{)", 258 r")[ \t]*(\{)",
257 bygroups(op_translate(Keyword), 259 bygroups(op_translate(Keyword),
258 LexBase.op_fixed(Whitespace, " ")), 260 LexBase.op_fixed(Whitespace, " ")),
259 "text-statement"), 261 "text-statement"),