c++ object support

This commit is contained in:
Daniel Sipka 2015-04-21 15:04:11 +02:00
parent 812b4bdb41
commit 8f7210f95d
19 changed files with 173 additions and 87 deletions

View file

@ -18,12 +18,11 @@ std::string state::outside_section::render(
ctx.set_state<in_inverted_section>(token.content());
break;
case token::type::variable:
case token::type::unescaped_variable: {
auto visitor = visitor::render_node((token.token_type() ==
token::type::variable)?flag::escape_html:flag::none);
auto node = ctx.get_node(token.content());
return boost::apply_visitor(visitor, node);
}
return boost::apply_visitor(visitor::render_node(flag::escape_html),
ctx.get_node(token.content()));
case token::type::unescaped_variable:
return boost::apply_visitor(visitor::render_node(flag::none),
ctx.get_node(token.content()));
case token::type::comment: break;
case token::type::text:
return token.content();