Quickbook: Use values for templates and snippets.

[SVN r70528]
This commit is contained in:
Daniel James
2011-03-24 21:25:18 +00:00
parent 210e2a95e8
commit e478c5befb
6 changed files with 154 additions and 106 deletions

View File

@@ -6,6 +6,8 @@
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
=============================================================================*/
#include <cassert>
#include "template_stack.hpp"
#ifdef BOOST_MSVC
@@ -14,6 +16,23 @@
namespace quickbook
{
template_body::template_body(
value const& content,
fs::path const& filename
)
: content(content.store())
, filename(filename)
{
assert(content.get_tag() == template_tags::block ||
content.get_tag() == template_tags::phrase);
}
bool template_body::is_block() const
{
return content.get_tag() == template_tags::block;
}
template_stack::template_stack()
: scope(template_stack::parser(*this))
, scopes()