import
This commit is contained in:
parent
9637d0ec7b
commit
eb98985815
207 changed files with 11155 additions and 0 deletions
31
src/visitor/render_node.cpp
Normal file
31
src/visitor/render_node.cpp
Normal file
|
@ -0,0 +1,31 @@
|
|||
#include <utils.h>
|
||||
#include "render_node.h"
|
||||
|
||||
using namespace mstch;
|
||||
|
||||
visitor::render_node::render_node(bool html_escaped): html_escaped(html_escaped) {
|
||||
}
|
||||
|
||||
std::string visitor::render_node::operator()(const boost::blank& blank) const {
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string visitor::render_node::operator()(const int& i) const {
|
||||
return std::to_string(i);
|
||||
}
|
||||
|
||||
std::string visitor::render_node::operator()(const bool& b) const {
|
||||
return b?"true":"false";
|
||||
}
|
||||
|
||||
std::string visitor::render_node::operator()(const std::string& str) const {
|
||||
return html_escaped?html_escape(str):str;
|
||||
}
|
||||
|
||||
std::string visitor::render_node::operator()(const array& arr) const {
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string visitor::render_node::operator()(const object& obj) const {
|
||||
return "";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue