|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r73982 - in trunk/tools/quickbook: src test/snippets
From: dnljms_at_[hidden]
Date: 2011-08-21 09:19:09
Author: danieljames
Date: 2011-08-21 09:19:08 EDT (Sun, 21 Aug 2011)
New Revision: 73982
URL: http://svn.boost.org/trac/boost/changeset/73982
Log:
Unordered: Don't 'pass thru' comment if `=` is repeated.
Text files modified:
trunk/tools/quickbook/src/code_snippet.cpp | 8 ++++----
trunk/tools/quickbook/test/snippets/pass_thru.cpp | 2 ++
trunk/tools/quickbook/test/snippets/pass_thru.gold | 11 +++++++++++
trunk/tools/quickbook/test/snippets/pass_thru.quickbook | 2 ++
4 files changed, 19 insertions(+), 4 deletions(-)
Modified: trunk/tools/quickbook/src/code_snippet.cpp
==============================================================================
--- trunk/tools/quickbook/src/code_snippet.cpp (original)
+++ trunk/tools/quickbook/src/code_snippet.cpp 2011-08-21 09:19:08 EDT (Sun, 21 Aug 2011)
@@ -166,12 +166,12 @@
// Note: Unlike escaped_comment and ignore, this doesn't
// swallow preceeding whitespace.
pass_thru_comment
- = "#="
+ = "#=" >> (cl::eps_p - '=')
>> ( *(cl::anychar_p - cl::eol_p)
>> (cl::eol_p | cl::end_p)
) [boost::bind(&actions_type::pass_thru, &actions, _1, _2)]
| cl::confix_p(
- "\"\"\"=",
+ "\"\"\"=" >> (cl::eps_p - '='),
(*cl::anychar_p) [boost::bind(&actions_type::pass_thru, &actions, _1, _2)],
"\"\"\""
)
@@ -288,12 +288,12 @@
// Note: Unlike escaped_comment and ignore, this doesn't
// swallow preceeding whitespace.
pass_thru_comment
- = "//="
+ = "//=" >> (cl::eps_p - '=')
>> ( *(cl::anychar_p - cl::eol_p)
>> (cl::eol_p | cl::end_p)
) [boost::bind(&actions_type::pass_thru, &actions, _1, _2)]
| cl::confix_p(
- "/*=",
+ "/*=" >> (cl::eps_p - '='),
(*cl::anychar_p) [boost::bind(&actions_type::pass_thru, &actions, _1, _2)],
"*/"
)
Modified: trunk/tools/quickbook/test/snippets/pass_thru.cpp
==============================================================================
--- trunk/tools/quickbook/test/snippets/pass_thru.cpp (original)
+++ trunk/tools/quickbook/test/snippets/pass_thru.cpp 2011-08-21 09:19:08 EDT (Sun, 21 Aug 2011)
@@ -1,3 +1,4 @@
+//[foo_cpp_copyright
/*=============================================================================
Copyright (c) 2011 Daniel James
@@ -5,6 +6,7 @@
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
=============================================================================*/
+//]
//[foo_cpp
struct Foo{
Modified: trunk/tools/quickbook/test/snippets/pass_thru.gold
==============================================================================
--- trunk/tools/quickbook/test/snippets/pass_thru.gold (original)
+++ trunk/tools/quickbook/test/snippets/pass_thru.gold 2011-08-21 09:19:08 EDT (Sun, 21 Aug 2011)
@@ -5,6 +5,17 @@
<title>Pass thru test</title>
<para>
+<programlisting><phrase role="comment">/*=============================================================================
+ Copyright (c) 2011 Daniel James
+
+ Use, modification and distribution is subject to the Boost Software
+ License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================*/</phrase>
+</programlisting>
+ </para>
+ <para>
+
<programlisting><phrase role="keyword">struct</phrase> <phrase role="identifier">Foo</phrase><phrase role="special">{</phrase>
<phrase role="identifier">Foo</phrase><phrase role="special">();</phrase>
Modified: trunk/tools/quickbook/test/snippets/pass_thru.quickbook
==============================================================================
--- trunk/tools/quickbook/test/snippets/pass_thru.quickbook (original)
+++ trunk/tools/quickbook/test/snippets/pass_thru.quickbook 2011-08-21 09:19:08 EDT (Sun, 21 Aug 2011)
@@ -5,6 +5,8 @@
[import pass_thru.cpp]
[import pass_thru.py]
+[foo_cpp_copyright]
+
[foo_cpp]
[foo_py]
\ No newline at end of file
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk