diff options
| author | Matthäus G. Chajdas <dev@anteru.net> | 2022-02-20 21:29:54 +0100 |
|---|---|---|
| committer | Matthäus G. Chajdas <dev@anteru.net> | 2022-02-20 21:29:54 +0100 |
| commit | 54382219e5c0fe84da2e314965f676ea984d71f4 (patch) | |
| tree | 93f3d5c883b51918de36c3456c9a18570f79ec05 | |
| parent | cc0a17ae26bd7be8768eeceaf46b171d48c3e380 (diff) | |
| parent | 1b7ef299da2c816753a225782c0620fa403a7135 (diff) | |
| download | pygments-git-54382219e5c0fe84da2e314965f676ea984d71f4.tar.gz | |
Merge branch 'fix-elpi' of https://github.com/gares/pygments into gares-fix-elpi
| -rw-r--r-- | pygments/lexers/elpi.py | 1 | ||||
| -rw-r--r-- | tests/snippets/elpi/test_pred.txt | 3 | ||||
| -rw-r--r-- | tests/snippets/elpi/test_type.txt | 20 |
3 files changed, 22 insertions, 2 deletions
diff --git a/pygments/lexers/elpi.py b/pygments/lexers/elpi.py index 3ce6ed6a..b86040df 100644 --- a/pygments/lexers/elpi.py +++ b/pygments/lexers/elpi.py @@ -111,6 +111,7 @@ class ElpiLexer(RegexLexer): ], 'elpi-ctype': [ (r"(ctype\s+)(\")",bygroups(Keyword.Type,String.Double),'elpi-string'), + (r'->',Keyword.Type), (constant_re,Keyword.Type), (r"\(|\)",Keyword.Type), (r",",Text,'#pop'), diff --git a/tests/snippets/elpi/test_pred.txt b/tests/snippets/elpi/test_pred.txt index 950790e7..657c8fde 100644 --- a/tests/snippets/elpi/test_pred.txt +++ b/tests/snippets/elpi/test_pred.txt @@ -34,8 +34,7 @@ pred p3 i:(bool -> prop). '(' Keyword.Type 'bool' Keyword.Type ' ' Text.Whitespace -'-' Error -'>' Keyword.Type +'->' Keyword.Type ' ' Text.Whitespace 'prop' Keyword.Type ')' Keyword.Type diff --git a/tests/snippets/elpi/test_type.txt b/tests/snippets/elpi/test_type.txt index a4a78fe8..8a506ce5 100644 --- a/tests/snippets/elpi/test_type.txt +++ b/tests/snippets/elpi/test_type.txt @@ -5,6 +5,7 @@ type cons A -> list A -> list A. kind tm type. type fun (tm -> tm) -> tm. type app tm -> tm -> tm. +pred foo i:(tm -> tm), o:tm. ---tokens--- 'kind' Keyword.Declaration @@ -90,3 +91,22 @@ type app tm -> tm -> tm. 'tm' Keyword.Type '.' Text '\n' Text.Whitespace + +'pred' Keyword.Declaration +' ' Text.Whitespace +'foo' Name.Function +' ' Text.Whitespace +'i:' Keyword.Mode +'(' Keyword.Type +'tm' Keyword.Type +' ' Text.Whitespace +'->' Keyword.Type +' ' Text.Whitespace +'tm' Keyword.Type +')' Keyword.Type +',' Text +' ' Text.Whitespace +'o:' Keyword.Mode +'tm' Keyword.Type +'.' Text +'\n' Text.Whitespace |
