diff options
author | Joe Jevnik <joejev@gmail.com> | 2014-06-03 18:26:08 -0400 |
---|---|---|
committer | Joe Jevnik <joejev@gmail.com> | 2014-06-03 18:26:08 -0400 |
commit | ae31a622a036cd32dd33795a6750fd7614ef2968 (patch) | |
tree | 51637497dc8d4e9a4d3a43a8cc3244c26f1764be | |
parent | 18f605604a9d2e2195973282b98feda330b87977 (diff) | |
download | pygments-ae31a622a036cd32dd33795a6750fd7614ef2968.tar.gz |
Adds block comments for scheme as defined in R6RS.
(http://www.r6rs.org/final/html/r6rs/r6rs-Z-H-7.html#node_sec_4.2.3)
-rw-r--r-- | pygments/lexers/functional.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pygments/lexers/functional.py b/pygments/lexers/functional.py index 16d9bad8..efe4d240 100644 --- a/pygments/lexers/functional.py +++ b/pygments/lexers/functional.py @@ -1002,6 +1002,8 @@ class SchemeLexer(RegexLexer): # the comments - always starting with semicolon # and going to the end of the line (r';.*$', Comment.Single), + # multi-line comment + (r'#\|', Comment.Multiline, 'multiline-comment'), # whitespaces - usually not relevant (r'\s+', Text), @@ -1050,6 +1052,12 @@ class SchemeLexer(RegexLexer): (r'(\(|\))', Punctuation), (r'(\[|\])', Punctuation), ], + 'multiline-comment' : [ + (r'#\|', Comment.Multiline, '#push'), + (r'\|#', Comment.Multiline, '#pop'), + (r'[^|#]+', Comment.Multiline), + (r'[|#]', Comment.Multiline), + ], } |