summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgbrandl <devnull@localhost>2006-10-30 22:23:09 +0100
committergbrandl <devnull@localhost>2006-10-30 22:23:09 +0100
commitfa75d4b2f0aa6c1a0b5e902613be9804204eed85 (patch)
tree3a4a5f07f3ca121612625d42c581e1ff287a4c1e
parent985cab8b605c98d362bfaf3ec67f14fafb2b3c61 (diff)
downloadpygments-fa75d4b2f0aa6c1a0b5e902613be9804204eed85.tar.gz
[svn] Even more.
-rw-r--r--pygments/lexers/compiled.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pygments/lexers/compiled.py b/pygments/lexers/compiled.py
index 003c7fff..9ffbebf1 100644
--- a/pygments/lexers/compiled.py
+++ b/pygments/lexers/compiled.py
@@ -35,7 +35,7 @@ class CLexer(RegexLexer):
(r'\n', Text),
(r'\s+', Text),
(r'\\\n', Text), # line continuation
- (r'//.*?(?!\\)\n', Comment),
+ (r'//(\n|(.|\n)*?[^\\]\n)', Comment),
(r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment),
],
'statements': [
@@ -126,7 +126,7 @@ class CppLexer(RegexLexer):
(r'\n', Text),
(r'\s+', Text),
(r'\\\n', Text), # line continuation
- (r'//.*?(?!\\)\n', Comment),
+ (r'//(\n|(.|\n)*?[^\\]\n)', Comment),
(r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment),
(r'[{}]', Keyword),
(r'L?"', String, 'string'),