Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76258 - branches/quickbook-dev/tools/quickbook/src
From: dnljms_at_[hidden]
Date: 2012-01-01 09:34:59


Author: danieljames
Date: 2012-01-01 09:34:58 EST (Sun, 01 Jan 2012)
New Revision: 76258
URL: http://svn.boost.org/trac/boost/changeset/76258

Log:
Quickbook: Use value for source_mode_next.

So that it can correctly be used to find the position.
Text files modified:
   branches/quickbook-dev/tools/quickbook/src/actions.cpp | 11 ++++++-----
   branches/quickbook-dev/tools/quickbook/src/actions_class.hpp | 2 +-
   branches/quickbook-dev/tools/quickbook/src/main_grammar.cpp | 4 ++--
   3 files changed, 9 insertions(+), 8 deletions(-)

Modified: branches/quickbook-dev/tools/quickbook/src/actions.cpp
==============================================================================
--- branches/quickbook-dev/tools/quickbook/src/actions.cpp (original)
+++ branches/quickbook-dev/tools/quickbook/src/actions.cpp 2012-01-01 09:34:58 EST (Sun, 01 Jan 2012)
@@ -48,10 +48,11 @@
             // TODO: This works but is a bit of an odd place to put it.
             // Might need to redefine the purpose of this function.
             if (!actions.source_mode_next.empty()) {
- detail::outwarn(actions.current_file, actions.source_mode_next.begin())
+ detail::outwarn(actions.source_mode_next.get_file(),
+ actions.source_mode_next.get_position())
                     << "Temporary source mode unsupported here."
                     << std::endl;
- actions.source_mode_next.clear();
+ actions.source_mode_next = value();
             }
 
             for(quickbook::actions::string_list::iterator
@@ -683,7 +684,7 @@
     void next_source_mode_action(quickbook::actions& actions, value source_mode)
     {
         value_consumer values = source_mode;
- actions.source_mode_next = values.consume().get_quickbook();
+ actions.source_mode_next = values.consume();
         values.finish();
     }
 
@@ -700,8 +701,8 @@
         bool block = code_tag != code_tags::inline_code;
 
         std::string source_mode = actions.source_mode_next.empty() ?
- actions.source_mode : actions.source_mode_next;
- actions.source_mode_next.clear();
+ actions.source_mode : actions.source_mode_next.get_quickbook();
+ actions.source_mode_next = value();
 
         if (inline_code) {
             write_anchors(actions, actions.phrase);

Modified: branches/quickbook-dev/tools/quickbook/src/actions_class.hpp
==============================================================================
--- branches/quickbook-dev/tools/quickbook/src/actions_class.hpp (original)
+++ branches/quickbook-dev/tools/quickbook/src/actions_class.hpp 2012-01-01 09:34:58 EST (Sun, 01 Jan 2012)
@@ -53,7 +53,7 @@
         bool imported;
         string_symbols macro;
         std::string source_mode;
- string_ref source_mode_next;
+ value source_mode_next;
         file_ptr current_file;
         fs::path filename_relative; // for the __FILENAME__ macro.
                                                     // (relative to the original file

Modified: branches/quickbook-dev/tools/quickbook/src/main_grammar.cpp
==============================================================================
--- branches/quickbook-dev/tools/quickbook/src/main_grammar.cpp (original)
+++ branches/quickbook-dev/tools/quickbook/src/main_grammar.cpp 2012-01-01 09:34:58 EST (Sun, 01 Jan 2012)
@@ -113,8 +113,8 @@
                     info_.type != element_info::maybe_block)
                 {
                     l.actions_.source_mode.swap(saved_source_mode_);
- l.actions_.source_mode = l.actions_.source_mode_next;
- l.actions_.source_mode_next.clear();
+ l.actions_.source_mode = l.actions_.source_mode_next.get_quickbook();
+ l.actions_.source_mode_next = value();
                 }
                 
                 return true;


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