Commits

Georg Brandl  committed 7e567ba

#467: highlight stray comment closer as error in C/C++ lexers.

  • Participants
  • Parent commits cf60bd3

Comments (0)

Files changed (2)

 
 - 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.
 
 

File pygments/lexers/compiled.py

             (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)),
             (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|'
         ],
     }
 
+
 class ScalaLexer(RegexLexer):
     """
     For `Scala <http://www.scala-lang.org>`_ source code.