7#include <boost/variant/apply_visitor.hpp>
9namespace client {
namespace code_gen {
50 if (!boost::apply_visitor(*
this, x.
operand_))
74 default : BOOST_ASSERT(0);
return false;
83 if (!boost::apply_visitor(*
this, x.
operand_))
93 default : BOOST_ASSERT(0);
return false;
104 if (!boost::apply_visitor(*
this,
arg))
108 std::vector<client::function::argument_t> args(x.
args.size());
109 for(
size_t i=0; i < x.
args.size(); i++) {
118 std::cout <<
"Undefined function "
123 if(! boost::get<1>(itr->second(args)))
return false;
125 double function_result = boost::get<0>(itr->second(args));
133 if (!boost::apply_visitor(*
this, x.
first))
Inform & endl(Inform &inf)
std::string::iterator iterator
boost::variant< expression, quoted_string > function_call_argument
boost::variant< double, bool, std::string > argument_t
std::list< function_call_argument > args
std::list< operation > rest
client::function::arguments_t evaluation_stack_
bool operator()(ast::nil)
std::map< std::string, client::function::type > functions_
std::map< std::string, double > variableDictionary_