MCPcopy Create free account
hub / github.com/appdevforall/CodeOnTheGo / execute_impl

Method execute_impl

subprojects/llama.cpp/common/jinja/runtime.cpp:83–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83value identifier::execute_impl(context & ctx) {
84 auto it = ctx.get_val(val);
85 auto builtins = global_builtins();
86 if (!it->is_undefined()) {
87 if (ctx.is_get_stats) {
88 it->stats.used = true;
89 }
90 JJ_DEBUG("Identifier '%s' found, type = %s", val.c_str(), it->type().c_str());
91 return it;
92 } else if (builtins.find(val) != builtins.end()) {
93 JJ_DEBUG("Identifier '%s' found in builtins", val.c_str());
94 return mk_val<value_func>(val, builtins.at(val));
95 } else {
96 JJ_DEBUG("Identifier '%s' not found, returning undefined", val.c_str());
97 return mk_val<value_undefined>(val);
98 }
99}
100
101value object_literal::execute_impl(context & ctx) {
102 auto obj = mk_val<value_object>();

Callers

nothing calls this directly

Calls 15

stringClass · 0.85
try_builtin_funcFunction · 0.85
func_argsClass · 0.85
exec_statementsFunction · 0.85
ensure_key_type_allowedFunction · 0.85
get_valMethod · 0.80
set_valMethod · 0.80
get_posMethod · 0.80
typeMethod · 0.65
findMethod · 0.65
atMethod · 0.65

Tested by

no test coverage detected