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

Method addReaderMacro

src/ast/ast_module.cpp:501–511  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 ) {

Callers 1

addModuleReaderMacroFunction · 0.80

Calls 3

insertMethod · 0.45
sealMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected