Mercurial > hgrepos > Python > libs > pygments-lexer-pseudocode2
comparison pygments_lexer_pseudocode2/algpseudocode.py @ 81:6d8b813fb296
Keyword constants like "True", "False", "Nil", "None", "Null" and "Empty"
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Thu, 30 Apr 2026 11:41:21 +0200 |
| parents | f487f0d322a5 |
| children | 36a0ef76a6d7 |
comparison
equal
deleted
inserted
replaced
| 80:f487f0d322a5 | 81:6d8b813fb296 |
|---|---|
| 221 include("punctuation"), | 221 include("punctuation"), |
| 222 include("py-strings"), | 222 include("py-strings"), |
| 223 include("py-numbers"), | 223 include("py-numbers"), |
| 224 (r"(?i)\\text\s*\{", LexBase.op_ignore, "text-in-expr"), | 224 (r"(?i)\\text\s*\{", LexBase.op_ignore, "text-in-expr"), |
| 225 include("remark"), | 225 include("remark"), |
| 226 include("keyword-constants"), | |
| 226 include("text-operators"), | 227 include("text-operators"), |
| 227 include("math-builtins"), | 228 include("math-builtins"), |
| 228 include("py-name"), | 229 include("py-name"), |
| 229 ], | 230 ], |
| 230 "expr-in-braces": [ | 231 "expr-in-braces": [ |
| 231 include("punctuation-in-braces"), | 232 include("punctuation-in-braces"), |
| 232 include("py-strings"), | 233 include("py-strings"), |
| 233 include("py-numbers"), | 234 include("py-numbers"), |
| 234 (r"(?i)\\text\s*\{", LexBase.op_ignore, "text-in-expr"), | 235 (r"(?i)\\text\s*\{", LexBase.op_ignore, "text-in-expr"), |
| 235 include("remark"), | 236 include("remark"), |
| 237 include("keyword-constants"), | |
| 236 include("text-operators"), | 238 include("text-operators"), |
| 237 include("math-builtins"), | 239 include("math-builtins"), |
| 238 include("py-name"), | 240 include("py-name"), |
| 239 ], | 241 ], |
| 240 "block-expr": [ # somewhat similar to "root" | 242 "block-expr": [ # somewhat similar to "root" |
| 278 "text-operators": [ | 280 "text-operators": [ |
| 279 (words(("in", "is", "and", "or", "xor", "not"), | 281 (words(("in", "is", "and", "or", "xor", "not"), |
| 280 prefix=r"(?<!\.)", | 282 prefix=r"(?<!\.)", |
| 281 suffix=r"\b"), | 283 suffix=r"\b"), |
| 282 Operator.Word), | 284 Operator.Word), |
| 285 ], | |
| 286 "keyword-constants": [ | |
| 287 (words(("True", "TRUE", "true", "False", "FALSE", "false", | |
| 288 "None", "NONE", "non", "Nil", "NIL", "nil", | |
| 289 "Null", "NULL", "null", | |
| 290 "Empty", "EMPTY", "empty"), | |
| 291 prefix=r"(?<!\.)", | |
| 292 suffix=r"\b"), | |
| 293 Keyword.Constant), | |
| 283 ], | 294 ], |
| 284 "punctuation": [ | 295 "punctuation": [ |
| 285 (r"[{}:(),;[\]]", Punctuation), | 296 (r"[{}:(),;[\]]", Punctuation), |
| 286 ], | 297 ], |
| 287 "punctuation-in-braces": [ | 298 "punctuation-in-braces": [ |
