mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-26 15:06:48 +00:00
better script compiler diagnostics
This commit is contained in:
parent
c3ef39eb6f
commit
c97845d35d
1 changed files with 5 additions and 2 deletions
|
@ -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…
Reference in a new issue