mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
added scriptrunning/startscript/stopscript; sorted out more case problems
This commit is contained in:
parent
185f8bd56d
commit
a61b2c39f0
26 changed files with 274 additions and 42 deletions
|
@ -10,7 +10,7 @@
|
|||
namespace Compiler
|
||||
{
|
||||
StringParser::StringParser (ErrorHandler& errorHandler, Context& context, Literals& literals)
|
||||
: Parser (errorHandler, context), mLiterals (literals), mState (StartState)
|
||||
: Parser (errorHandler, context), mLiterals (literals), mState (StartState), mSmashCase (false)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -20,7 +20,11 @@ namespace Compiler
|
|||
{
|
||||
if (mState==StartState || mState==CommaState)
|
||||
{
|
||||
Generator::pushString (mCode, mLiterals, name);
|
||||
if (mSmashCase)
|
||||
Generator::pushString (mCode, mLiterals, toLower (name));
|
||||
else
|
||||
Generator::pushString (mCode, mLiterals, name);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -47,6 +51,12 @@ namespace Compiler
|
|||
{
|
||||
mState = StartState;
|
||||
mCode.clear();
|
||||
mSmashCase = false;
|
||||
}
|
||||
|
||||
void StringParser::smashCase()
|
||||
{
|
||||
mSmashCase = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue