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

Method translate

sources/compiler/codegen.cpp:29–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27
28namespace cs {
29 statement_base *
30 method_expression::translate(const context_t &context, const std::deque<std::deque<token_base *>> &raw)
31 {
32 tree_type<token_base *> &tree = static_cast<token_expr *>(raw.front().front())->get_tree();
33 if (context->compiler->fold_expr && tree.root().usable() &&
34 tree.root().data()->get_type() == token_types::value)
35 return nullptr;
36 else
37 return new statement_expression(tree, context, raw.front().back());
38 }
39
40 void method_import::preprocess(const context_t &context, const std::deque<std::deque<token_base *>> &raw)
41 {

Callers 2

translate_endMethod · 0.45
interpretMethod · 0.45

Calls 15

compile_errorClass · 0.85
internal_errorClass · 0.85
dataMethod · 0.80
sizeMethod · 0.80
check_define_varMethod · 0.80
leftMethod · 0.80
rightMethod · 0.80
emplace_root_leftMethod · 0.80
set_mem_fnMethod · 0.80
exceptionFunction · 0.50
usableMethod · 0.45
rootMethod · 0.45

Tested by

no test coverage detected