summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgbrandl <devnull@localhost>2006-12-20 15:40:48 +0100
committergbrandl <devnull@localhost>2006-12-20 15:40:48 +0100
commit746e0fa822472ea365ef1596bd97c112536356cc (patch)
tree8879970319c87a69c46689fb5bef296109f846c8
parent14d194fcdd43466e41cebceec764ad928d31ab3d (diff)
downloadpygments-746e0fa822472ea365ef1596bd97c112536356cc.tar.gz
[svn] Fix one TODO item.
-rw-r--r--TODO11
-rw-r--r--pygments/lexer.py2
-rw-r--r--pygments/lexers/compiled.py6
3 files changed, 10 insertions, 9 deletions
diff --git a/TODO b/TODO
index 1ca79483..8419a247 100644
--- a/TODO
+++ b/TODO
@@ -25,12 +25,6 @@ for 0.6
* mysql/postgresql/sqlite
* tcl
-- tell the C(++) and PHP lexers how to differ between Operators and text.
-
-- add support for function name highlighting to c++ lexer
-
-- readd property support for C# lexer
-
for 0.7
-------
@@ -39,6 +33,11 @@ for 0.7
- moin parser
+- readd property support for C# lexer? that is, find a regex that doesn't
+ backtrack to death...
+
+- add support for function name highlighting to c++ lexer
+
- pygmentize presets?
- more unit tests (pygmentize, all formatters comprehensively)
diff --git a/pygments/lexer.py b/pygments/lexer.py
index 092870ce..16a6b8ab 100644
--- a/pygments/lexer.py
+++ b/pygments/lexer.py
@@ -543,7 +543,7 @@ def do_insertions(insertions, tokens):
The result is a combined token stream.
- XXX: The indices yielded by this function are not correct!
+ FIXME: The indices yielded by this function are not correct!
"""
insertions = iter(insertions)
try:
diff --git a/pygments/lexers/compiled.py b/pygments/lexers/compiled.py
index 37a5983a..08a5c90d 100644
--- a/pygments/lexers/compiled.py
+++ b/pygments/lexers/compiled.py
@@ -55,7 +55,8 @@ class CLexer(RegexLexer):
(r'0[0-7]+[Ll]?', Number.Oct),
(r'(\d+\.\d*|\.\d+)', Number.Float),
(r'\d+', Number.Integer),
- (r'[~!%^&*()+=|\[\]:,.<>/?-]', Punctuation), # missing: Operators
+ (r'[~!%^&*+=|?:<>/-]', Operator),
+ (r'[()\[\],.]', Punctuation),
(r'(auto|break|case|const|continue|default|do|else|enum|extern|'
r'for|goto|if|register|restricted|return|sizeof|static|struct|'
r'switch|typedef|union|volatile|virtual|while)\b', Keyword),
@@ -145,7 +146,8 @@ class CppLexer(RegexLexer):
(r'0[0-7]+[Ll]?', Number.Oct),
(r'(\d+\.\d*|\.\d+)', Number.Float),
(r'\d+', Number.Integer),
- (r'[~!%^&*()+=|\[\]:;,.<>/?-]', Punctuation),
+ (r'[~!%^&*+=|?:<>/-]', Operator),
+ (r'[()\[\],.]', Punctuation),
(r'(asm|auto|break|case|catch|const|const_cast|continue|'
r'default|delete|do|dynamic_cast|else|enum|explicit|export|'
r'extern|for|friend|goto|if|mutable|namespace|new|operator|'