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

Method translate_end

sources/compiler/codegen.cpp:375–384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

373 }
374
375 statement_base *method_until::translate_end(method_base *method, const context_t &context,
376 std::deque<std::deque<token_base *>> &raw,
377 std::deque<token_base *> &code)
378 {
379 if (method != nullptr && method->get_target_type() == statement_types::loop_)
380 return static_cast<method_loop *>(method)->translate(context, raw,
381 static_cast<token_expr *>(code.at(1))->get_tree());
382 else
383 throw compile_error("Use until in non-loop statement.");
384 }
385
386 statement_base *method_loop::translate(const context_t &context, const std::deque<std::deque<token_base *>> &raw)
387 {

Callers 2

translateMethod · 0.45
interpretMethod · 0.45

Calls 3

compile_errorClass · 0.85
get_target_typeMethod · 0.45
translateMethod · 0.45

Tested by

no test coverage detected