MCPcopy Create free account
hub / github.com/covscript/covscript / call_el

Method call_el

sources/instance/statement.cpp:133–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131 }
132
133 var function::call_el(const function *_this, vector &args)
134 {
135 current_process->poll_event();
136 if (!args.empty())
137 throw runtime_error("Wrong size of arguments. Expected none, provided " + std::to_string(args.size()));
138#ifdef CS_DEBUGGER
139 fcall_guard fcall(_this->mDecl);
140 if (_this->mMatch)
141 cs_debugger_func_callback(_this->mDecl, _this->mStmt);
142#endif
143 try {
144 return _this->mContext->instance->parse_expr(static_cast<const statement_return *>(_this->mBody.front())->get_tree().root());
145 }
146 catch (const cs::exception &e) {
147 throw e;
148 }
149 catch (const std::exception &e) {
150 const statement_base *ptr = _this->mBody.front();
151 throw exception(ptr->get_line_num(), ptr->get_file_path(), ptr->get_raw_code(), e.what());
152 }
153 }
154
155 void struct_builder::do_inherit()
156 {

Callers

nothing calls this directly

Calls 11

runtime_errorClass · 0.85
poll_eventMethod · 0.80
sizeMethod · 0.80
parse_exprMethod · 0.80
exceptionFunction · 0.70
to_stringFunction · 0.50
emptyMethod · 0.45
rootMethod · 0.45
get_line_numMethod · 0.45
whatMethod · 0.45

Tested by

no test coverage detected