| 499 | } |
| 500 | |
| 501 | bool Module::addReaderMacro ( ReaderMacro * ptr, bool canFail ) { |
| 502 | if ( readMacros.insert(make_pair(ptr->name, unique_ptr<ReaderMacro>(ptr))).second ) { |
| 503 | ptr->seal(this); |
| 504 | return true; |
| 505 | } else { |
| 506 | if ( !canFail ) { |
| 507 | DAS_FATAL_ERROR("can't add duplicate reader macro %s to module %s\n", ptr->name.c_str(), name.c_str() ); |
| 508 | } |
| 509 | return false; |
| 510 | } |
| 511 | } |
| 512 | |
| 513 | bool Module::addCommentReader ( CommentReader * ptr, bool canFail ) { |
| 514 | if ( commentReader ) { |
no test coverage detected