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

Function addRttiRequireVariable

src/ast/ast_parse.cpp:1113–1127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1111 }
1112
1113 void addRttiRequireVariable ( ProgramPtr res, string fileName ) {
1114 TextWriter ss;
1115 for ( const auto & arq : res->allRequireDecl ) {
1116 ss << get<1>(arq) << " ";
1117 }
1118 ss << fileName;
1119 auto rtti_require = new Variable();
1120 rtti_require->name = "__rtti_require";
1121 rtti_require->type = new TypeDecl(Type::tString);
1122 rtti_require->init = new ExprConstString(ss.str());
1123 rtti_require->init->type = new TypeDecl(Type::tString);
1124 rtti_require->used = true;
1125 rtti_require->private_variable = true;
1126 res->thisModule->addVariable(rtti_require);
1127 }
1128
1129 void reportChain ( TextWriter & tw, const vector<FileInfo *> & chain ) {
1130 bool first = true;

Callers 1

compileDaScriptFunction · 0.85

Calls 2

strMethod · 0.45
addVariableMethod · 0.45

Tested by

no test coverage detected