MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / addModuleVariable

Function addModuleVariable

src/builtin/module_builtin_ast.cpp:154–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152 }
153
154 bool addModuleVariable ( Module * module, VariablePtr & _var, Context * context, LineInfoArg * lineInfo ) {
155 if ( !module ) context->throw_error_at(lineInfo, "expecting module, not null");
156 VariablePtr var = das::move(_var);
157 return module->addVariable(das::move(var), true);
158 }
159
160 VariablePtr findModuleVariable ( Module * module, const char * name ) {
161 return name ? module->findVariable(name) : nullptr;

Callers

nothing calls this directly

Calls 2

throw_error_atMethod · 0.80
addVariableMethod · 0.45

Tested by

no test coverage detected