diff --git a/include/mstch/mstch.hpp b/include/mstch/mstch.hpp index 124af02..9cb10c9 100644 --- a/include/mstch/mstch.hpp +++ b/include/mstch/mstch.hpp @@ -40,17 +40,25 @@ using renderer = std::function; class lambda { public: - lambda(std::function fun): + lambda(std::function fun): + fun([fun](const std::string&, renderer){return fun();}) + { + } + + lambda(std::function fun): fun(fun) { } - std::string operator()(const std::string& text, renderer renderer) const { + std::string operator()( + const std::string& text = "", + renderer renderer = renderer()) const + { return fun(text, renderer); } private: - std::function fun; + std::function fun; }; using node = boost::make_recursive_variant< diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d24f8e7..aa0d9f7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -8,6 +8,12 @@ include_directories( set(SRC state/in_section.cpp state/outside_section.cpp + state/render_state.hpp + visitor/get_token.hpp + visitor/has_token.hpp + visitor/is_node_empty.hpp + visitor/render_node.hpp + visitor/render_section.hpp mstch.cpp render_context.cpp template_type.cpp diff --git a/src/mstch.cpp b/src/mstch.cpp index 63297fd..0b0ec7a 100644 --- a/src/mstch.cpp +++ b/src/mstch.cpp @@ -11,8 +11,8 @@ std::string mstch::render( const node& root, const std::map& partials) { - std::map partial_templts; + std::map partial_templates; for (auto& partial: partials) - partial_templts.insert({partial.first, {partial.second}}); - return render_context(root, partial_templts).render(tmplt); + partial_templates.insert({partial.first, {partial.second}}); + return render_context(root, partial_templates).render(tmplt); } diff --git a/src/render_context.cpp b/src/render_context.cpp index 51477b4..c71bd02 100644 --- a/src/render_context.cpp +++ b/src/render_context.cpp @@ -5,7 +5,6 @@ #include "visitor/has_token.hpp" using namespace mstch; -using namespace mstch::visitor; const mstch::node render_context::null_node; @@ -13,8 +12,7 @@ render_context::push::push(render_context& context, const mstch::node& node): context(context) { context.nodes.emplace_front(node); - context.state.push(std::unique_ptr( - new state::outside_section)); + context.state.push(std::unique_ptr(new outside_section)); } render_context::push::~push() { @@ -29,11 +27,9 @@ std::string render_context::push::render(const template_type& templt) { render_context::render_context( const mstch::node& node, const std::map& partials): - partials{partials}, - nodes{node} + partials{partials}, nodes{node} { - state.push(std::unique_ptr( - new state::outside_section)); + state.push(std::unique_ptr(new outside_section)); } const mstch::node& render_context::find_node( @@ -41,8 +37,7 @@ const mstch::node& render_context::find_node( const std::deque& current_nodes) { if (token != "." && token.find('.') != std::string::npos) - return find_node( - token.substr(token.rfind('.') + 1), + return find_node(token.substr(token.rfind('.') + 1), {find_node(token.substr(0, token.rfind('.')), current_nodes)}); else for (auto& node: current_nodes) diff --git a/src/render_context.hpp b/src/render_context.hpp index fc9e553..a6a66fd 100644 --- a/src/render_context.hpp +++ b/src/render_context.hpp @@ -30,7 +30,7 @@ class render_context { std::string render_partial(const std::string& partial_name); template void set_state(Args&& ... args) { - state.top() = std::unique_ptr( + state.top() = std::unique_ptr( new T(std::forward(args)...)); } @@ -41,7 +41,7 @@ class render_context { const std::deque& current_nodes); const std::map& partials; std::deque nodes; - std::stack> state; + std::stack> state; }; } diff --git a/src/state/in_section.cpp b/src/state/in_section.cpp index 67c233f..2a226a0 100644 --- a/src/state/in_section.cpp +++ b/src/state/in_section.cpp @@ -5,14 +5,13 @@ #include "utils.hpp" using namespace mstch; -using namespace mstch::visitor; -state::in_section::in_section(type type, const std::string& section_name): +in_section::in_section(type type, const std::string& section_name): m_type(type), section_name(section_name), skipped_openings(0) { } -std::string state::in_section::render(render_context& ctx, const token& token) { +std::string in_section::render(render_context& ctx, const token& token) { if (token.token_type() == token::type::section_close) if (token.name() == section_name && skipped_openings == 0) { auto& node = ctx.get_node(section_name); diff --git a/src/state/in_section.hpp b/src/state/in_section.hpp index 2980e20..e3a1918 100644 --- a/src/state/in_section.hpp +++ b/src/state/in_section.hpp @@ -7,7 +7,6 @@ #include "template_type.hpp" namespace mstch { -namespace state { class in_section: public render_state { public: @@ -25,4 +24,3 @@ class in_section: public render_state { }; } -} diff --git a/src/state/outside_section.cpp b/src/state/outside_section.cpp index ab273be..7b22299 100644 --- a/src/state/outside_section.cpp +++ b/src/state/outside_section.cpp @@ -6,9 +6,8 @@ #include "utils.hpp" using namespace mstch; -using namespace mstch::visitor; -std::string state::outside_section::render( +std::string outside_section::render( render_context& ctx, const token& token) { using flag = render_node::flag; diff --git a/src/state/outside_section.hpp b/src/state/outside_section.hpp index d5c6346..8617dce 100644 --- a/src/state/outside_section.hpp +++ b/src/state/outside_section.hpp @@ -3,7 +3,6 @@ #include "render_state.hpp" namespace mstch { -namespace state { class outside_section: public render_state { public: @@ -11,4 +10,3 @@ class outside_section: public render_state { }; } -} diff --git a/src/state/render_state.hpp b/src/state/render_state.hpp index 968d9b0..e289c5b 100644 --- a/src/state/render_state.hpp +++ b/src/state/render_state.hpp @@ -8,12 +8,9 @@ namespace mstch { class render_context; -namespace state { - class render_state { public: virtual std::string render(render_context& context, const token& token) = 0; }; } -} diff --git a/src/utils.hpp b/src/utils.hpp index 39bcc8b..51e2bd6 100644 --- a/src/utils.hpp +++ b/src/utils.hpp @@ -13,7 +13,7 @@ citer first_not_ws(criter begin, criter end); std::string html_escape(std::string str); template -auto visit(Args&& ... args) -> decltype(boost::apply_visitor( +auto visit(Args&&... args) -> decltype(boost::apply_visitor( std::forward(args)...)) { return boost::apply_visitor(std::forward(args)...); diff --git a/src/visitor/get_token.hpp b/src/visitor/get_token.hpp index d0d37db..7f16444 100644 --- a/src/visitor/get_token.hpp +++ b/src/visitor/get_token.hpp @@ -4,9 +4,9 @@ #include #include "mstch/mstch.hpp" +#include "has_token.hpp" namespace mstch { -namespace visitor { class get_token: public boost::static_visitor { public: @@ -38,4 +38,3 @@ inline const mstch::node& get_token::operator()>( } } -} diff --git a/src/visitor/has_token.hpp b/src/visitor/has_token.hpp index 3309688..e01f91b 100644 --- a/src/visitor/has_token.hpp +++ b/src/visitor/has_token.hpp @@ -6,7 +6,6 @@ #include "mstch/mstch.hpp" namespace mstch { -namespace visitor { class has_token: public boost::static_visitor { public: @@ -17,7 +16,8 @@ class has_token: public boost::static_visitor { inline bool operator()(const T& t) const { return token == "."; } -private: + + private: const std::string& token; }; @@ -34,4 +34,3 @@ inline bool has_token::operator()>( } } -} diff --git a/src/visitor/is_node_empty.hpp b/src/visitor/is_node_empty.hpp index 64e88a3..3214417 100644 --- a/src/visitor/is_node_empty.hpp +++ b/src/visitor/is_node_empty.hpp @@ -6,7 +6,6 @@ #include "mstch/mstch.hpp" namespace mstch { -namespace visitor { class is_node_empty: public boost::static_visitor { public: @@ -24,20 +23,20 @@ inline bool is_node_empty::operator()( } template<> -inline bool is_node_empty::operator()(const int& val) const { - return val == 0; +inline bool is_node_empty::operator()(const int& value) const { + return value == 0; } template<> -inline bool is_node_empty::operator()(const bool& val) const { - return !val; +inline bool is_node_empty::operator()(const bool& value) const { + return !value; } template<> inline bool is_node_empty::operator()( - const std::string& val) const + const std::string& value) const { - return val == ""; + return value == ""; } template<> @@ -46,4 +45,3 @@ inline bool is_node_empty::operator()(const array& array) const { } } -} diff --git a/src/visitor/render_node.hpp b/src/visitor/render_node.hpp index 2cb245e..bddfd3c 100644 --- a/src/visitor/render_node.hpp +++ b/src/visitor/render_node.hpp @@ -7,7 +7,6 @@ #include "utils.hpp" namespace mstch { -namespace visitor { class render_node: public boost::static_visitor { public: @@ -28,21 +27,25 @@ class render_node: public boost::static_visitor { }; template<> -inline std::string render_node::operator()(const int& val) const { - return std::to_string(val); +inline std::string render_node::operator()(const int& value) const { + return std::to_string(value); } -template<> inline -std::string render_node::operator()(const bool& val) const { - return val?"true":"false"; +template<> +inline std::string render_node::operator()(const bool& value) const { + return value?"true":"false"; +} + +template<> +inline std::string render_node::operator()(const lambda& value) const { + return (m_flag == flag::escape_html)?html_escape(value()):value(); } template<> inline std::string render_node::operator()( - const std::string& val) const + const std::string& value) const { - return (m_flag == flag::escape_html)?html_escape(val):val; + return (m_flag == flag::escape_html)?html_escape(value):value; } } -} diff --git a/src/visitor/render_section.hpp b/src/visitor/render_section.hpp index 173cf72..c9d84bf 100644 --- a/src/visitor/render_section.hpp +++ b/src/visitor/render_section.hpp @@ -8,7 +8,6 @@ #include "utils.hpp" namespace mstch { -namespace visitor { class render_section: public boost::static_visitor { public: @@ -26,7 +25,7 @@ class render_section: public boost::static_visitor { return render_context::push(ctx, t).render(section); } -private: + private: render_context& ctx; const template_type& section; flag m_flag; @@ -34,13 +33,12 @@ private: template<> inline std::string render_section::operator()(const lambda& fun) const { - return ""; - /*std::string section_str; + std::string section_str; for(auto& token: section) section_str += token.raw(); - return lam(section_str, [this](const std::string& str) { - return ctx.render(template_type{str}); - });*/ + return fun(section_str, [this](const std::string& str) { + return render_context::push(ctx).render(template_type{str}); + }); } template<> @@ -55,4 +53,3 @@ inline std::string render_section::operator()(const array& array) const { } } -} diff --git a/test/benchmark_main.cpp b/test/benchmark_main.cpp index 5382b5c..412581b 100644 --- a/test/benchmark_main.cpp +++ b/test/benchmark_main.cpp @@ -12,8 +12,8 @@ int main() { std::string comment_tmp{ "

{{header}}

    " "{{#comments}}
  • {{name}}
    " - "

    {{body}}

  • {{/comments}}
" - }; + "

{{body}}

{{/comments}}"}; + auto comment_view = mstch::map{ {"header", std::string{"My Post Comments"}}, {"comments", mstch::array{ @@ -21,9 +21,7 @@ int main() { mstch::map{{"name", std::string{"Sam"}}, {"body", std::string{"Thanks for this post!"}}}, mstch::map{{"name", std::string{"Heather"}}, {"body", std::string{"Thanks for this post!"}}}, mstch::map{{"name", std::string{"Kathy"}}, {"body", std::string{"Thanks for this post!"}}}, - mstch::map{{"name", std::string{"George"}}, {"body", std::string{"Thanks for this post!"}}} - }} - }; + mstch::map{{"name", std::string{"George"}}, {"body", std::string{"Thanks for this post!"}}}}}}; std::vector times; for (int j = 0; j < 10; j++) { diff --git a/test/data/bug_11_eating_whitespace.hpp b/test/data/bug_11_eating_whitespace.hpp index b76ae5b..57ce819 100644 --- a/test/data/bug_11_eating_whitespace.hpp +++ b/test/data/bug_11_eating_whitespace.hpp @@ -1,3 +1,3 @@ const auto bug_11_eating_whitespace_data = mstch::map{ {"tag", std::string{"yo"}} -}; +}; \ No newline at end of file diff --git a/test/data/comments.hpp b/test/data/comments.hpp index a3d93b7..ca97699 100644 --- a/test/data/comments.hpp +++ b/test/data/comments.hpp @@ -1,12 +1,3 @@ -class comments: public mstch::object { -public: - comments() { - register_methods(this, {{"title", &comments::title}}); - } - - mstch::node title() { - return std::string{"A Comedy of Errors"}; - } -}; - -const mstch::node comments_data = std::make_shared(); \ No newline at end of file +const mstch::node comments_data = mstch::map{ + {"title", mstch::lambda{[](){return std::string{"A Comedy of Errors"};}}} +}; \ No newline at end of file diff --git a/test/data/complex.hpp b/test/data/complex.hpp index 36926a8..481580d 100644 --- a/test/data/complex.hpp +++ b/test/data/complex.hpp @@ -45,7 +45,8 @@ public: { register_methods(this, { {"header", &complex::header}, {"item", &complex::item}, - {"list", &complex::list}, {"empty", &complex::empty}}); + {"list", &complex::list}, {"empty", &complex::empty} + }); } mstch::node header() { diff --git a/test/data/escaped.hpp b/test/data/escaped.hpp index 23122ec..b6aecf3 100644 --- a/test/data/escaped.hpp +++ b/test/data/escaped.hpp @@ -1,18 +1,4 @@ -class escaped: public mstch::object { -public: - escaped() { - register_methods(this, { - {"title", &escaped::title}, {"entities", &escaped::entities} - }); - } - - mstch::node title() { - return std::string{"Bear > Shark"}; - }; - - mstch::node entities() { - return std::string{"" \"'<>/"}; - } -}; - -const mstch::node escaped_data = std::make_shared(); \ No newline at end of file +const mstch::node escaped_data = mstch::map{ + {"title", mstch::lambda{[](){ return std::string{"Bear > Shark"}; }}}, + {"entities", mstch::lambda{[](){ return std::string{"" \"'<>/"}; }}} +}; \ No newline at end of file diff --git a/test/data/falsy_array.hpp b/test/data/falsy_array.hpp index 37cef58..20a6394 100644 --- a/test/data/falsy_array.hpp +++ b/test/data/falsy_array.hpp @@ -3,6 +3,6 @@ const auto falsy_array_data = mstch::map{ mstch::array{std::string{""}, std::string{"emptyString"}}, mstch::array{mstch::array{}, std::string{"emptyArray"}}, mstch::array{0, std::string{"zero"}}, - mstch::array{mstch::node{}, std::string{"null"}} - }} + mstch::array{mstch::node{}, std::string{"null"}}} + } }; \ No newline at end of file diff --git a/test/data/higher_order_sections.hpp b/test/data/higher_order_sections.hpp new file mode 100644 index 0000000..75599a4 --- /dev/null +++ b/test/data/higher_order_sections.hpp @@ -0,0 +1,28 @@ +class higher_order_sections: public mstch::object { + private: + std::string m_helper; + public: + higher_order_sections(): m_helper{"To tinker?"} { + register_methods(this, { + {"name", &higher_order_sections::name}, + {"helper", &higher_order_sections::helper}, + {"bolder", &higher_order_sections::bolder} + }); + } + + mstch::node name() { + return std::string{"Tater"}; + } + + mstch::node helper() { + return m_helper; + } + + mstch::node bolder() { + return mstch::lambda{[this](const std::string& text, mstch::renderer render) { + return text + " => " + render(text) + " " + m_helper; + }}; + } +}; + +const mstch::node higher_order_sections_data = std::make_shared(); \ No newline at end of file diff --git a/test/data/lambda/higher_order_sections.mustache b/test/data/higher_order_sections.mustache similarity index 100% rename from test/data/lambda/higher_order_sections.mustache rename to test/data/higher_order_sections.mustache diff --git a/test/data/lambda/higher_order_sections.txt b/test/data/higher_order_sections.txt similarity index 100% rename from test/data/lambda/higher_order_sections.txt rename to test/data/higher_order_sections.txt diff --git a/test/data/lambda/check_falsy.js b/test/data/lambda/check_falsy.js deleted file mode 100644 index 5a599ca..0000000 --- a/test/data/lambda/check_falsy.js +++ /dev/null @@ -1,7 +0,0 @@ -({ - number: function(text, render) { - return function(text, render) { - return +render(text); - } - } -}) diff --git a/test/data/lambda/check_falsy.mustache b/test/data/lambda/check_falsy.mustache deleted file mode 100644 index 30e2547..0000000 --- a/test/data/lambda/check_falsy.mustache +++ /dev/null @@ -1 +0,0 @@ -

{{#number}}0{{/number}}

diff --git a/test/data/lambda/check_falsy.txt b/test/data/lambda/check_falsy.txt deleted file mode 100644 index 3bb2f51..0000000 --- a/test/data/lambda/check_falsy.txt +++ /dev/null @@ -1 +0,0 @@ -

0

diff --git a/test/data/lambda/higher_order_sections.js b/test/data/lambda/higher_order_sections.js deleted file mode 100644 index bacb0a4..0000000 --- a/test/data/lambda/higher_order_sections.js +++ /dev/null @@ -1,9 +0,0 @@ -({ - name: "Tater", - helper: "To tinker?", - bolder: function () { - return function (text, render) { - return text + ' => ' + render(text) + ' ' + this.helper; - } - } -}) diff --git a/test/data/nested_higher_order_sections.hpp b/test/data/nested_higher_order_sections.hpp index 538e708..28acc89 100644 --- a/test/data/nested_higher_order_sections.hpp +++ b/test/data/nested_higher_order_sections.hpp @@ -1,21 +1,6 @@ -class nested_higher_order_sections: public mstch::object { -public: - nested_higher_order_sections() { - register_methods(this, { - {"bold", &nested_higher_order_sections::bold}, - {"person", &nested_higher_order_sections::person} - }); - } - - mstch::node bold() { - return mstch::lambda{[](const std::string& text, mstch::renderer render) { - return std::string{""} + render(text) + std::string{""}; - }}; - }; - - mstch::node person() { - return mstch::map{{"name", std::string{"Jonas"}}}; - } -}; - -const mstch::node nested_higher_order_sections_data = std::make_shared(); \ No newline at end of file +const mstch::node nested_higher_order_sections_data = mstch::map{ + {"bold", mstch::lambda{[](const std::string& text, mstch::renderer render) { + return std::string{""} + render(text) + std::string{""}; + }}}, + {"person", mstch::map{{"name", std::string{"Jonas"}}}} +}; \ No newline at end of file diff --git a/test/data/null_lookup_object.hpp b/test/data/null_lookup_object.hpp index 4dc2214..cbee5f9 100644 --- a/test/data/null_lookup_object.hpp +++ b/test/data/null_lookup_object.hpp @@ -1,14 +1,14 @@ const auto null_lookup_object_data = mstch::map{ - {"name", std::string{"David"}}, - {"twitter", std::string{"@dasilvacontin"}}, - {"fobject", mstch::array{ + {"name", std::string{"David"}}, + {"twitter", std::string{"@dasilvacontin"}}, + {"fobject", mstch::array{ mstch::map{ - {"name", std::string{"Flor"}}, - {"twitter", std::string{"@florrts"}} - }, - mstch::map{ - {"name", std::string{"Miquel"}}, - {"twitter", mstch::node{}} + {"name", std::string{"Flor"}}, + {"twitter", std::string{"@florrts"}} + }, + mstch::map{ + {"name", std::string{"Miquel"}}, + {"twitter", mstch::node{}} } - }} + }} }; \ No newline at end of file diff --git a/test/data/partial_template.hpp b/test/data/partial_template.hpp index ca15079..932b936 100644 --- a/test/data/partial_template.hpp +++ b/test/data/partial_template.hpp @@ -1,18 +1,4 @@ -class partial_template: public mstch::object { -public: - partial_template() { - register_methods(this, { - {"title", &partial_template::title}, - {"again", &partial_template::again}}); - } - - mstch::node title() { - return std::string{"Welcome"}; - } - - mstch::node again() { - return std::string{"Goodbye"}; - } -}; - -const auto partial_template_data = std::make_shared(); \ No newline at end of file +const mstch::node partial_template_data = mstch::map{ + {"title", mstch::lambda{[](){ return std::string{"Welcome"}; }}}, + {"again", mstch::lambda{[](){ return std::string{"Goodbye"}; }}}, +}; \ No newline at end of file diff --git a/test/data/partial_view.hpp b/test/data/partial_view.hpp index fa6d7db..b6341ef 100644 --- a/test/data/partial_view.hpp +++ b/test/data/partial_view.hpp @@ -9,7 +9,8 @@ public: {"name", &partial_view::name}, {"value", &partial_view::value}, {"taxed_value", &partial_view::taxed_value}, - {"in_ca", &partial_view::in_ca},}); + {"in_ca", &partial_view::in_ca} + }); } mstch::node greeting() { diff --git a/test/data/partial_whitespace.hpp b/test/data/partial_whitespace.hpp index a63a20c..f61447c 100644 --- a/test/data/partial_whitespace.hpp +++ b/test/data/partial_whitespace.hpp @@ -9,7 +9,8 @@ public: {"name", &partial_whitespace::name}, {"value", &partial_whitespace::value}, {"taxed_value", &partial_whitespace::taxed_value}, - {"in_ca", &partial_whitespace::in_ca},}); + {"in_ca", &partial_whitespace::in_ca} + }); } mstch::node greeting() { diff --git a/test/data/section_functions_in_partials.hpp b/test/data/section_functions_in_partials.hpp index 6459271..8f60fd5 100644 --- a/test/data/section_functions_in_partials.hpp +++ b/test/data/section_functions_in_partials.hpp @@ -1,15 +1,5 @@ -class section_functions_in_partials: public mstch::object { -public: - section_functions_in_partials() { - register_methods(this, {{"bold", §ion_functions_in_partials::bold}}); - } - - mstch::node bold() { - return std::string{""}; - /*return [](const std::string& text, mstch::renderer render) { - return std::string{""} + render(text) + std::string{""}; - };*/ - } -}; - -const auto section_functions_in_partials_data = std::make_shared(); \ No newline at end of file +const mstch::node section_functions_in_partials_data = mstch::map{ + {"bold", mstch::lambda{[](const std::string& text, mstch::renderer render) { + return std::string{""} + render(text) + std::string{""}; + }}} +}; \ No newline at end of file diff --git a/test/data/simple.hpp b/test/data/simple.hpp index 5800732..e7e6088 100644 --- a/test/data/simple.hpp +++ b/test/data/simple.hpp @@ -1,21 +1,19 @@ class simple: public mstch::object { private: - std::string m_name; int m_value; - bool m_in_ca; public: simple(): - m_name{"Chris"}, - m_value{10000}, - m_in_ca{true} + m_value{10000} { register_methods(this, { - {"name", &simple::name}, {"value", &simple::value}, - {"taxed_value", &simple::taxed_value}, {"in_ca", &simple::in_ca}}); + {"name", &simple::name}, + {"value", &simple::value}, + {"taxed_value", &simple::taxed_value}, + {"in_ca", &simple::in_ca}}); } mstch::node name() { - return m_name; + return std::string{"Chris"}; } mstch::node value() { @@ -27,8 +25,8 @@ public: } mstch::node in_ca() { - return m_in_ca; + return true; } }; -const auto simple_data = std::make_shared(); +const auto simple_data = std::make_shared(); \ No newline at end of file diff --git a/test/data/unescaped.hpp b/test/data/unescaped.hpp index cfca8d5..c4e6ef3 100644 --- a/test/data/unescaped.hpp +++ b/test/data/unescaped.hpp @@ -1,12 +1,3 @@ -class unescaped: public mstch::object { -public: - unescaped() { - register_methods(this, {{"title", &unescaped::title}}); - } - - mstch::node title() { - return std::string{"Bear > Shark"}; - } -}; - -const auto unescaped_data = std::make_shared(); \ No newline at end of file +const mstch::node unescaped_data = mstch::map{ + {"title", mstch::lambda{[](){ return std::string{"Bear > Shark"}; }}} +}; \ No newline at end of file diff --git a/test/test_main.cpp b/test/test_main.cpp index 61cd646..f1a7a81 100644 --- a/test/test_main.cpp +++ b/test/test_main.cpp @@ -35,13 +35,14 @@ MSTCH_TEST(escaped) MSTCH_TEST(falsy) MSTCH_TEST(falsy_array) MSTCH_TEST(grandparent_context) +MSTCH_TEST(higher_order_sections) MSTCH_TEST(implicit_iterator) MSTCH_TEST(included_tag) MSTCH_TEST(inverted_section) MSTCH_TEST(keys_with_questionmarks) MSTCH_TEST(multiline_comment) MSTCH_TEST(nested_dot) -//MSTCH_TEST(nested_higher_order_sections) +MSTCH_TEST(nested_higher_order_sections) MSTCH_TEST(nested_iterating) MSTCH_TEST(nesting) MSTCH_TEST(nesting_same_name) @@ -59,7 +60,7 @@ MSTCH_PARTIAL_TEST(partial_whitespace) MSTCH_TEST(recursion_with_same_names) MSTCH_TEST(reuse_of_enumerables) MSTCH_TEST(section_as_context) -//MSTCH_PARTIAL_TEST(section_functions_in_partials) +MSTCH_PARTIAL_TEST(section_functions_in_partials) MSTCH_TEST(simple) MSTCH_TEST(string_as_context) MSTCH_TEST(two_in_a_row)