better script compiler diagnostics

loadfix
Marc Zinnschlag 10 years ago
parent c3ef39eb6f
commit c97845d35d

@ -85,8 +85,6 @@ namespace MWScript
mParser.getCode (code); mParser.getCode (code);
mScripts.insert (std::make_pair (name, std::make_pair (code, mParser.getLocals()))); mScripts.insert (std::make_pair (name, std::make_pair (code, mParser.getLocals())));
// TODO sanity check on generated locals
return true; return true;
} }
} }
@ -175,6 +173,11 @@ namespace MWScript
if (const ESM::Script *script = mStore.get<ESM::Script>().find (name2)) if (const ESM::Script *script = mStore.get<ESM::Script>().find (name2))
{ {
if (mVerbose)
std::cout
<< "scanning script for local variable declarations: " << name2
<< std::endl;
Compiler::Locals locals; Compiler::Locals locals;
std::istringstream stream (script->mScriptText); std::istringstream stream (script->mScriptText);

Loading…
Cancel
Save