Mercurial > hgrepos > Python > libs > pygments-lexer-pseudocode2
comparison docs/lexer-algpseudocode.rst @ 208:de7118d299e9
Aliases for states: context or mode
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Wed, 13 May 2026 15:56:58 +0200 |
| parents | 76053daf813e |
| children | f20177032d21 |
comparison
equal
deleted
inserted
replaced
| 207:76053daf813e | 208:de7118d299e9 |
|---|---|
| 40 | 40 |
| 41 States | 41 States |
| 42 ====== | 42 ====== |
| 43 | 43 |
| 44 The AlgPseudocode lexer and its language variants AlgPseudocodeDE and | 44 The AlgPseudocode lexer and its language variants AlgPseudocodeDE and |
| 45 AlgPseudocodeFR basically work in three states: `default`, | 45 AlgPseudocodeFR basically work in three states (aka modes or contexts): |
| 46 `expression` and `text`. | 46 `default`, `expression` and `text`. |
| 47 | 47 |
| 48 In expressions it automatically recognizes: | 48 In `expressions` it automatically recognizes: |
| 49 | 49 |
| 50 - Strings (single-quote, double-quote, triple-single-quote, | 50 - Strings (single-quote, double-quote, triple-single-quote, |
| 51 triple-double-quote, `Python`_ style) | 51 triple-double-quote, `Python`_ style) |
| 52 - Numbers (also `Python`_ style) | 52 - Numbers (also `Python`_ style) |
| 53 - (Mathematical) operators and symbols | 53 - (Mathematical) operators and symbols |
| 65 | 65 |
| 66 - Names (`Name.Entity`) | 66 - Names (`Name.Entity`) |
| 67 | 67 |
| 68 - :ref:`explicit-token-types` | 68 - :ref:`explicit-token-types` |
| 69 | 69 |
| 70 In the default-mode it recognizes all sorts of single- and multi-line | 70 In the `default`-mode it recognizes all sorts of single- and multi-line |
| 71 comments in addition to expressions and commands that are inspired by | 71 comments in addition to expressions and commands that are inspired by |
| 72 `Algpseudocodex`_. | 72 `Algpseudocodex`_. |
| 73 | 73 |
| 74 In texts it recognizes: | 74 In `texts` it recognizes: |
| 75 | 75 |
| 76 - ``\EXPR`` or ``\EXPRESSION`` | 76 - ``\EXPR`` or ``\EXPRESSION`` |
| 77 | 77 |
| 78 To switch to expression-mode. | 78 To switch to expression-mode. |
| 79 | 79 |
