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

Method addEnumeration

src/ast/ast_module.cpp:538–548  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

536 }
537
538 bool Module::addEnumeration ( const EnumerationPtr & en, bool canFail ) {
539 if ( enumerations.insert(en->name, en) ) {
540 en->module = this;
541 return true;
542 } else {
543 if ( !canFail ) {
544 DAS_FATAL_ERROR("can't add duplicate enumeration %s to module %s\n", en->name.c_str(), name.c_str() );
545 }
546 return false;
547 }
548 }
549
550 bool Module::removeStructure ( const StructurePtr & st ) {
551 return structures.remove(st->name);

Callers 3

ast_addEmptyEnumFunction · 0.45

Calls 2

insertMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected