MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / lookup

Method lookup

Engine/source/console/compiler.cpp:178–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176}
177
178S32 FuncVars::lookup(StringTableEntry var, S32 lineNumber)
179{
180 std::unordered_map<StringTableEntry, Var>::iterator found = vars.find(var);
181
182 if (found == vars.end())
183 {
184 const char* str = avar("Script Warning: Variable %s referenced before used when compiling script. File: %s Line: %d", var, CodeBlock::smCurrentParser->getCurrentFile(), lineNumber);
185 scriptErrorHandler(str);
186
187 return assign(var, TypeReqString, lineNumber, false);
188 }
189
190 return found->second.reg;
191}
192
193TypeReq FuncVars::lookupType(StringTableEntry var, S32 lineNumber)
194{

Callers 15

initPersistFieldsMethod · 0.45
isMethodMethod · 0.45
setCurVarNameMethod · 0.45
execMethod · 0.45
compileMethod · 0.45
compileStmtMethod · 0.45
processMethod · 0.45
getLocalVariableEntryFunction · 0.45
getVariableEntryFunction · 0.45
getAddVariableEntryFunction · 0.45
getAddLocalVariableEntryFunction · 0.45

Calls 9

avarFunction · 0.85
scriptErrorHandlerFunction · 0.85
errorfFunction · 0.70
findFunction · 0.50
distanceFunction · 0.50
findMethod · 0.45
endMethod · 0.45
insertMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected