summaryrefslogtreecommitdiff
path: root/pygments/lexers/functional.py
diff options
context:
space:
mode:
Diffstat (limited to 'pygments/lexers/functional.py')
-rw-r--r--pygments/lexers/functional.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/pygments/lexers/functional.py b/pygments/lexers/functional.py
index efe4d240..bbee8c83 100644
--- a/pygments/lexers/functional.py
+++ b/pygments/lexers/functional.py
@@ -999,11 +999,16 @@ class SchemeLexer(RegexLexer):
tokens = {
'root' : [
- # the comments - always starting with semicolon
+ # the comments
# and going to the end of the line
(r';.*$', Comment.Single),
# multi-line comment
(r'#\|', Comment.Multiline, 'multiline-comment'),
+ # commented form (entire sexpr folliwng)
+ (r'#;\s*\(', Comment, 'commented-form'),
+ # signifies that the program text that follows is written with the
+ # lexical and datum syntax described in r6rs
+ (r'#!r6rs', Comment),
# whitespaces - usually not relevant
(r'\s+', Text),
@@ -1058,6 +1063,11 @@ class SchemeLexer(RegexLexer):
(r'[^|#]+', Comment.Multiline),
(r'[|#]', Comment.Multiline),
],
+ 'commented-form' : [
+ (r'\(', Comment, '#push'),
+ (r'\)', Comment, '#pop'),
+ (r'[^()]+', Comment),
+ ],
}