#include "fun.hpp" namespace fkstd { STDRET assert_eq(STDARGS args) { auto oracle = args[0]; auto expr = args[1]; if (!oracle->equals(*expr)) { std::stringstream ss; ss << "assertion failed: expected '" << oracle->string() << "', got '" << expr->string() << "'"; oracle->loc().error(LOG_ERROR, ss.str()); } return std::make_shared(TYPE_BOOL, true, oracle->loc()); } STDRET println(STDARGS args) { std::string sep; for (auto arg: args) { std::cout << sep << arg->string(); sep = " "; } Loc loc {"???"}; if (args.size() > 0) { loc = args.front()->loc(); } std::cout << std::endl; return std::make_shared(TYPE_INT, 0, loc); } }