Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r75617 - branches/quickbook-dev/tools/quickbook/src
From: dnljms_at_[hidden]
Date: 2011-11-22 18:46:31


Author: danieljames
Date: 2011-11-22 18:46:31 EST (Tue, 22 Nov 2011)
New Revision: 75617
URL: http://svn.boost.org/trac/boost/changeset/75617

Log:
Quickbook: Add note about how import/include works.
Text files modified:
   branches/quickbook-dev/tools/quickbook/src/actions.cpp | 7 +++++++
   branches/quickbook-dev/tools/quickbook/src/template_stack.cpp | 1 -
   2 files changed, 7 insertions(+), 1 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 2011-11-22 18:46:31 EST (Tue, 22 Nov 2011)
@@ -1787,6 +1787,13 @@
         bool keep_inner_source_mode = (qbk_version_n < 106);
         
         {
+ // When importing, state doesn't scope templates and macros so that
+ // they're added to the existing scope. It might be better to add
+ // them to a new scope then explicitly import them into the
+ // existing scope.
+ //
+ // For old versions of quickbook, templates aren't scoped by the
+ // file.
             file_state state(actions,
                 load_type == block_tags::import ? file_state::scope_output :
                 qbk_version_n >= 106u ? file_state::scope_callables :

Modified: branches/quickbook-dev/tools/quickbook/src/template_stack.cpp
==============================================================================
--- branches/quickbook-dev/tools/quickbook/src/template_stack.cpp (original)
+++ branches/quickbook-dev/tools/quickbook/src/template_stack.cpp 2011-11-22 18:46:31 EST (Tue, 22 Nov 2011)
@@ -68,7 +68,6 @@
         return scopes.front();
     }
     
- // TODO: Should symbols defined by '[import]' use the current scope?
     bool template_stack::add(template_symbol const& ts)
     {
         BOOST_ASSERT(!scopes.empty());


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