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

Method addAlias

src/ast/ast_module.cpp:438–449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

436 }
437
438 bool Module::addAlias ( const TypeDeclPtr & at, bool canFail ) {
439 if ( at->alias.empty() ) return false;
440 if ( aliasTypes.insert(at->alias, at) ) {
441 at->module = this;
442 return true;
443 } else {
444 if ( !canFail ) {
445 DAS_FATAL_ERROR("can't add duplicate alias %s to module %s\n",at->alias.c_str(), name.c_str() );
446 }
447 return false;
448 }
449 }
450
451 void Module::registerAnnotation ( AnnotationPtr ptr ) {
452 auto key = hash64z(ptr->name.c_str());

Callers 6

yyparseFunction · 0.45
yyparseFunction · 0.45
yyparseFunction · 0.45
das_module_bind_aliasFunction · 0.45
addModuleAliasFunction · 0.45

Calls 3

emptyMethod · 0.45
insertMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected