| 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){ |
no test coverage detected