$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r84152 - in trunk/tools/quickbook: doc src test
From: dnljms_at_[hidden]
Date: 2013-05-05 09:46:58
Author: danieljames
Date: 2013-05-05 09:46:57 EDT (Sun, 05 May 2013)
New Revision: 84152
URL: http://svn.boost.org/trac/boost/changeset/84152
Log:
C++11 keywords. Refs #8541.
Text files modified: 
   trunk/tools/quickbook/doc/change_log.qbk          |     2 ++                                      
   trunk/tools/quickbook/src/syntax_highlight.cpp    |    29 ++++++++++++++++-------------           
   trunk/tools/quickbook/test/code_cpp-1_5.gold      |     8 ++++++++                                
   trunk/tools/quickbook/test/code_cpp-1_5.quickbook |     7 +++++++                                 
   4 files changed, 33 insertions(+), 13 deletions(-)
Modified: trunk/tools/quickbook/doc/change_log.qbk
==============================================================================
--- trunk/tools/quickbook/doc/change_log.qbk	(original)
+++ trunk/tools/quickbook/doc/change_log.qbk	2013-05-05 09:46:57 EDT (Sun, 05 May 2013)
@@ -284,6 +284,8 @@
   character elsewhere
   ([@https://svn.boost.org/trac/boost/ticket/8510 #8510],
   [@https://svn.boost.org/trac/boost/ticket/8511 #8511]).
+* Add C++11 keywords to syntax highlighter
+  ([@https://svn.boost.org/trac/boost/ticket/8541 #8541]).
 * Hidden options for formatting of `--output-deps`. Not really for public use
 * yet.
 * 1.6 changes:
Modified: trunk/tools/quickbook/src/syntax_highlight.cpp
==============================================================================
--- trunk/tools/quickbook/src/syntax_highlight.cpp	(original)
+++ trunk/tools/quickbook/src/syntax_highlight.cpp	2013-05-05 09:46:57 EDT (Sun, 05 May 2013)
@@ -205,20 +205,23 @@
         keywords_holder()
         {
             cpp
-                    =   "and_eq", "and", "asm", "auto", "bitand", "bitor",
-                        "bool", "break", "case", "catch", "char", "class",
-                        "compl", "const_cast", "const", "continue", "default",
-                        "delete", "do", "double", "dynamic_cast",  "else",
-                        "enum", "explicit", "export", "extern", "false",
-                        "float", "for", "friend", "goto", "if", "inline",
-                        "int", "long", "mutable", "namespace", "new", "not_eq",
-                        "not", "operator", "or_eq", "or", "private",
-                        "protected", "public", "register", "reinterpret_cast",
-                        "return", "short", "signed", "sizeof", "static",
+                    =   "alignas", "alignof", "and_eq", "and", "asm", "auto",
+                        "bitand", "bitor", "bool", "break", "case", "catch",
+                        "char", "char16_t", "char32_t", "class", "compl",
+                        "const", "const_cast", "constexpr", "continue",
+                        "decltype", "default", "delete", "do", "double",
+                        "dynamic_cast",  "else", "enum", "explicit", "export",
+                        "extern", "false", "float", "for", "friend", "goto",
+                        "if", "inline", "int", "long", "mutable", "namespace",
+                        "new", "noexcept", "not_eq", "not", "nullptr",
+                        "operator", "or_eq", "or", "private", "protected",
+                        "public", "register", "reinterpret_cast", "return",
+                        "short", "signed", "sizeof", "static", "static_assert",
                         "static_cast", "struct", "switch", "template", "this",
-                        "throw", "true", "try", "typedef", "typeid",
-                        "typename", "union", "unsigned", "using", "virtual",
-                        "void", "volatile", "wchar_t", "while", "xor_eq", "xor"
+                        "thread_local", "throw", "true", "try", "typedef",
+                        "typeid", "typename", "union", "unsigned", "using",
+                        "virtual", "void", "volatile", "wchar_t", "while",
+                        "xor_eq", "xor"
                     ;
 
             python
Modified: trunk/tools/quickbook/test/code_cpp-1_5.gold
==============================================================================
--- trunk/tools/quickbook/test/code_cpp-1_5.gold	(original)
+++ trunk/tools/quickbook/test/code_cpp-1_5.gold	2013-05-05 09:46:57 EDT (Sun, 05 May 2013)
@@ -29,4 +29,12 @@
   </para>
 <programlisting><phrase role="comment">/* Oh dear <emphasis role="bold">bold</emphasis>
 </phrase></programlisting>
+  <para>
+    Just some code:
+  </para>
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+    <phrase role="keyword">constexpr</phrase> <phrase role="keyword">char32_t</phrase> <phrase role="identifier">x</phrase> <phrase role="special">=</phrase> <phrase role="char">'a'</phrase><phrase role="special">;</phrase>
+    <phrase role="keyword">const</phrase> <phrase role="keyword">auto</phrase> <phrase role="identifier">y</phrase> <phrase role="special">=</phrase> <phrase role="identifier">x</phrase> <phrase role="special">-</phrase> <phrase role="char">' '</phrase><phrase role="special">;</phrase>
+<phrase role="special">}</phrase>
+</programlisting>
 </article>
Modified: trunk/tools/quickbook/test/code_cpp-1_5.quickbook
==============================================================================
--- trunk/tools/quickbook/test/code_cpp-1_5.quickbook	(original)
+++ trunk/tools/quickbook/test/code_cpp-1_5.quickbook	2013-05-05 09:46:57 EDT (Sun, 05 May 2013)
@@ -25,3 +25,10 @@
 A badly formed comment with an escape:
 
     /* Oh dear ``*bold*``
+
+Just some code:
+
+    int main() {
+        constexpr char32_t x = 'a';
+        const auto y = x - ' ';
+    }