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

Function canShareModule

src/ast/ast_parse.cpp:1082–1094  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1080 }
1081
1082 bool canShareModule ( ProgramPtr program ) {
1083 // Check if all dependencies are shared too
1084 bool regFromShar = false;
1085 for ( auto & reqM : program->thisModule->requireModule ) {
1086 if ( !reqM.first->builtIn ) {
1087 program->error("Shared module " + program->thisModule->name + " has incorrect dependency type.",
1088 "Can't require " + reqM.first->name + " because its not shared", "", LineInfo(),
1089 CompilationError::invalid_module_require);
1090 regFromShar = true;
1091 }
1092 }
1093 return !regFromShar;
1094 }
1095
1096 void writebackModules ( ModuleGroup & libGroup ) {
1097 auto & serializer_write = daScriptEnvironment::getBound()->serializer_write;

Callers 1

compileDaScriptFunction · 0.85

Calls 2

LineInfoClass · 0.50
errorMethod · 0.45

Tested by

no test coverage detected