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

Method addVariable

src/ast/ast_module.cpp:525–536  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

523
524
525 bool Module::addVariable ( const VariablePtr & var, bool canFail ) {
526 if ( globals.insert(var->name, var) ) {
527 var->module = this;
528 var->global = true;
529 return true;
530 } else {
531 if ( !canFail ) {
532 DAS_FATAL_ERROR("can't add duplicate variable %s to module %s\n", var->name.c_str(), name.c_str() );
533 }
534 return false;
535 }
536 }
537
538 bool Module::addEnumeration ( const EnumerationPtr & en, bool canFail ) {
539 if ( enumerations.insert(en->name, en) ) {

Callers 9

ast_structureDeclarationFunction · 0.45
ast_globalLetListFunction · 0.45
ast_globalBitfieldConstFunction · 0.45
ast_globalLetFunction · 0.45
RemoveUnusedSymbolsMethod · 0.45
addRttiRequireVariableFunction · 0.45
addModuleVariableFunction · 0.45
addConstantFunction · 0.45

Calls 2

insertMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected