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

Function setParents

src/ast/ast_handle.cpp:8–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6namespace das {
7
8 void setParents ( Module * mod, const char * child, const std::initializer_list<const char *> & parents ) {
9 auto chA = mod->findAnnotation(child);
10 DAS_VERIFYF(chA,"missing child annotation");
11 DAS_VERIFYF(chA->rtti_isBasicStructureAnnotation(),"expecting basic structure annotation");
12 auto bsaCh = (BasicStructureAnnotation *) chA;
13 for ( auto parent : parents ) {
14 auto chP = mod->findAnnotation(parent);
15 DAS_VERIFYF(chP,"missing parent annotation");
16 bsaCh->parents.push_back((TypeAnnotation *)chP);
17 }
18 }
19
20 uint64_t BasicStructureAnnotation::getOwnSemanticHash ( HashBuilder & hb, das_set<Structure *> & dep, das_set<Annotation *> & adep ) const {
21 hb.updateString(getMangledName());

Callers

nothing calls this directly

Calls 2

findAnnotationMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected