diff options
author | Georg Brandl <georg@python.org> | 2010-03-01 16:25:52 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-03-01 16:25:52 +0100 |
commit | 224db4ea8cdeee9b86e0264496b5d6f55cdce216 (patch) | |
tree | d4bd1e9f027586f3b41c15b4e03bd7b05ab5ddd4 | |
parent | bac7edec4fadebbf80b1d4306da841a50095695f (diff) | |
download | pygments-224db4ea8cdeee9b86e0264496b5d6f55cdce216.tar.gz |
#467: highlight stray comment closer as error in C/C++ lexers.
-rw-r--r-- | CHANGES | 2 | ||||
-rw-r--r-- | pygments/lexers/compiled.py | 3 |
2 files changed, 5 insertions, 0 deletions
@@ -30,6 +30,8 @@ Version 1.3 - Fixed regex highlighting bugs in Perl lexer (#258). +- Add small enhancements to the C lexer (#467) and Bash lexer (#469). + - Gherkin lexer: Fixed single apostrophe bug and added new i18n keywords. diff --git a/pygments/lexers/compiled.py b/pygments/lexers/compiled.py index 4601c12c..b1a2dc61 100644 --- a/pygments/lexers/compiled.py +++ b/pygments/lexers/compiled.py @@ -59,6 +59,7 @@ class CLexer(RegexLexer): (r'0x[0-9a-fA-F]+[Ll]?', Number.Hex), (r'0[0-7]+[Ll]?', Number.Oct), (r'\d+[Ll]?', Number.Integer), + (r'\*/', Error), (r'[~!%^&*+=|?:<>/-]', Operator), (r'[()\[\],.]', Punctuation), (r'\b(case)(.+?)(:)', bygroups(Keyword, using(this), Text)), @@ -183,6 +184,7 @@ class CppLexer(RegexLexer): (r'0x[0-9a-fA-F]+[Ll]?', Number.Hex), (r'0[0-7]+[Ll]?', Number.Oct), (r'\d+[Ll]?', Number.Integer), + (r'\*/', Error), (r'[~!%^&*+=|?:<>/-]', Operator), (r'[()\[\],.;]', Punctuation), (r'(asm|auto|break|case|catch|const|const_cast|continue|' @@ -925,6 +927,7 @@ class JavaLexer(RegexLexer): ], } + class ScalaLexer(RegexLexer): """ For `Scala <http://www.scala-lang.org>`_ source code. |