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

Method parse_fcall

sources/instance/runtime.cpp:380–398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

378 }
379
380 var runtime_type::parse_fcall(const var &a, token_base *b)
381 {
382 vector args;
383 token_base *ptr = nullptr;
384 args.reserve(static_cast<token_arglist *>(b)->get_arglist().size());
385 a.prep_call(args);
386 for (auto &tree : static_cast<token_arglist *>(b)->get_arglist()) {
387 ptr = tree.root().data();
388 if (ptr != nullptr && ptr->get_type() == token_types::expand) {
389 var val = parse_expr(static_cast<token_expand *>(ptr)->get_tree().root());
390 const auto &arr = val.const_val<array>();
391 for (auto &it : arr)
392 args.push_back(lvalue(it));
393 }
394 else
395 args.push_back(lvalue(parse_expr(tree.root())));
396 }
397 return a.fcall(args);
398 }
399
400 var &runtime_type::parse_access_lhs(const var &a, const var &b)
401 {

Callers

nothing calls this directly

Calls 7

lvalueFunction · 0.85
sizeMethod · 0.80
dataMethod · 0.80
prep_callMethod · 0.45
rootMethod · 0.45
get_typeMethod · 0.45
fcallMethod · 0.45

Tested by

no test coverage detected