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

Method addStructure

src/ast/ast_module.cpp:554–564  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

552 }
553
554 bool Module::addStructure ( const StructurePtr & st, bool canFail ) {
555 if ( structures.insert(st->name, st) ) {
556 st->module = this;
557 return true;
558 } else {
559 if ( !canFail ) {
560 DAS_FATAL_ERROR("can't add duplicate structure %s to module %s\n", st->name.c_str(), name.c_str() );
561 }
562 return false;
563 }
564 }
565
566 bool Module::addKeyword (const string & kwd, bool needOxfordComma, bool canFail ) {
567 auto it = find_if(keywords.begin(), keywords.end(), [&](auto value){

Callers 5

ast_structureNameFunction · 0.45
visitMethod · 0.45
convertBlockToLambdaMethod · 0.45
addModuleStructureFunction · 0.45

Calls 2

insertMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected