| 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 ¶llel_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 | { |
no test coverage detected