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

Method parse_using

sources/instance/instance.cpp:319–333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

317 }
318
319 void instance_type::parse_using(tree_type<token_base *>::iterator it, bool override)
320 {
321 if (it.data()->get_type() == token_types::parallel) {
322 auto &parallel_list = static_cast<token_parallel *>(it.data())->get_parallel();
323 for (auto &t : parallel_list)
324 parse_using(t.root());
325 }
326 else {
327 var ns = context->instance->parse_expr(it, true);
328 if (ns.is_type_of<namespace_t>())
329 context->instance->storage.involve_domain(ns.const_val<namespace_t>()->get_domain(), override);
330 else
331 throw runtime_error("Only support involve namespace.");
332 }
333 }
334
335 repl::repl(context_t c) : context(std::move(c))
336 {

Callers 1

run_implMethod · 0.80

Calls 6

runtime_errorClass · 0.85
dataMethod · 0.80
parse_exprMethod · 0.80
involve_domainMethod · 0.80
get_typeMethod · 0.45
rootMethod · 0.45

Tested by

no test coverage detected