From c9ac4d615d5a52b07c3bdacac3e1a3c2fe6c48b5 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 28 Dec 2011 18:52:35 +0000 Subject: [PATCH] Highlighters: tweak colorize_cplusplus --- src/highlighters.cc | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/highlighters.cc b/src/highlighters.cc index bb400640..9767755f 100644 --- a/src/highlighters.cc +++ b/src/highlighters.cc @@ -99,15 +99,6 @@ HighlighterAndId colorize_regex_factory(Window& window, void colorize_cplusplus(DisplayBuffer& display_buffer) { - static boost::regex preprocessor("(\\`|(?<=\\n))\\h*#\\h*[^\\n]*"); - colorize_regex(display_buffer, preprocessor, Color::Magenta); - - static boost::regex comments("//[^\\n]*\\n"); - colorize_regex(display_buffer, comments, Color::Cyan); - - static boost::regex strings("(?|\\<-?\\d+[fdiu]?|'\\\\?[^']?'"); colorize_regex(display_buffer, values, Color::Red); @@ -122,6 +113,16 @@ void colorize_cplusplus(DisplayBuffer& display_buffer) static boost::regex types_keywords("\\<(const|auto|namespace|static|volatile|class|struct|enum|union|public|protected|private|template|typedef|virtual)\\>"); colorize_regex(display_buffer, types_keywords, Color::Green); + + static boost::regex strings("(?