diff 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
line wrap: on
line diff
--- a/pygments_lexer_pseudocode2/algpseudocode.py	Wed May 06 15:53:24 2026 +0200
+++ b/pygments_lexer_pseudocode2/algpseudocode.py	Wed May 06 16:12:17 2026 +0200
@@ -68,6 +68,7 @@
         "OUTPUTS": "Outputs:",
         "RETURNS": "Returns:",
         "ENSURE": "Ensure:",
+        "REQUIRE": "Require:",
         "IS": "IS",
         "WITH": "WITH",
         "IF": "IF",
@@ -252,6 +253,7 @@
              r"(?:input(?:s)?)"
              r"|(?:output(?:s)?)"
              r"|(?:ensure)"
+             r"|(?:require)"
              r"|(?:returns)"
              r")[ \t]*(\{)",
              bygroups(op_translate(Keyword),