summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Baumann <tim@timbaumann.info>2014-08-31 17:40:23 +0200
committerTim Baumann <tim@timbaumann.info>2014-08-31 17:40:23 +0200
commitfb36a5cea3738b96036b9d536e54cd3d2b4261d6 (patch)
tree541f1b141634343ce98c2fb64e3e28e33b4f9f0d
parentce7ab4225df16d761e62ff2d7ab6fc5d88d57eb1 (diff)
downloadpygments-fb36a5cea3738b96036b9d536e54cd3d2b4261d6.tar.gz
Idris lexer: add support for doc comments
-rw-r--r--pygments/lexers/functional.py1
-rw-r--r--tests/examplefiles/test.idr1
2 files changed, 2 insertions, 0 deletions
diff --git a/pygments/lexers/functional.py b/pygments/lexers/functional.py
index 85f07a31..2c7e03ed 100644
--- a/pygments/lexers/functional.py
+++ b/pygments/lexers/functional.py
@@ -1546,6 +1546,7 @@ class IdrisLexer(RegexLexer):
(r'^(\s*)(%%%s)' % '|'.join(annotations),
bygroups(Text, Keyword.Reserved)),
(r'(\s*)(--(?![!#$%&*+./<=>?@\^|_~:\\]).*?)$', bygroups(Text, Comment.Single)),
+ (r'(\s*)(\|{3}.*?)$', bygroups(Text, Comment.Single)),
(r'(\s*)({-)', bygroups(Text, Comment.Multiline), 'comment'),
# Declaration
(r'^(\s*)([^\s\(\)\{\}]+)(\s*)(:)(\s*)',
diff --git a/tests/examplefiles/test.idr b/tests/examplefiles/test.idr
index c31232b5..fd008d31 100644
--- a/tests/examplefiles/test.idr
+++ b/tests/examplefiles/test.idr
@@ -60,6 +60,7 @@ using (G : Vect n Ty)
fromInteger = Val . fromInteger
+ ||| Evaluates an expression in the given context.
interp : Env G -> {static} Expr G t -> interpTy t
interp env (Var i) = lookup i env
interp env (Val x) = x