mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 18:19:55 +00:00
fixed a constness-issue
This commit is contained in:
parent
910d62e4b8
commit
d213c6c36a
18 changed files with 39 additions and 39 deletions
|
@ -154,7 +154,7 @@ namespace Compiler
|
|||
}
|
||||
}
|
||||
|
||||
ControlParser::ControlParser (ErrorHandler& errorHandler, Context& context, Locals& locals,
|
||||
ControlParser::ControlParser (ErrorHandler& errorHandler, const Context& context, Locals& locals,
|
||||
Literals& literals)
|
||||
: Parser (errorHandler, context), mLocals (locals), mLiterals (literals),
|
||||
mLineParser (errorHandler, context, locals, literals, mCodeBlock),
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace Compiler
|
|||
|
||||
public:
|
||||
|
||||
ControlParser (ErrorHandler& errorHandler, Context& context, Locals& locals,
|
||||
ControlParser (ErrorHandler& errorHandler, const Context& context, Locals& locals,
|
||||
Literals& literals);
|
||||
|
||||
void appendCode (std::vector<Interpreter::Type_Code>& code) const;
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "skipparser.hpp"
|
||||
#include "locals.hpp"
|
||||
|
||||
Compiler::DeclarationParser::DeclarationParser (ErrorHandler& errorHandler, Context& context,
|
||||
Compiler::DeclarationParser::DeclarationParser (ErrorHandler& errorHandler, const Context& context,
|
||||
Locals& locals)
|
||||
: Parser (errorHandler, context), mLocals (locals), mState (State_Begin), mType (0)
|
||||
{}
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace Compiler
|
|||
|
||||
public:
|
||||
|
||||
DeclarationParser (ErrorHandler& errorHandler, Context& context, Locals& locals);
|
||||
DeclarationParser (ErrorHandler& errorHandler, const Context& context, Locals& locals);
|
||||
|
||||
virtual bool parseName (const std::string& name, const TokenLoc& loc,
|
||||
Scanner& scanner);
|
||||
|
|
|
@ -219,7 +219,7 @@ namespace Compiler
|
|||
return false;
|
||||
}
|
||||
|
||||
ExprParser::ExprParser (ErrorHandler& errorHandler, Context& context, Locals& locals,
|
||||
ExprParser::ExprParser (ErrorHandler& errorHandler, const Context& context, Locals& locals,
|
||||
Literals& literals, bool argument)
|
||||
: Parser (errorHandler, context), mLocals (locals), mLiterals (literals),
|
||||
mNextOperand (true), mFirst (true), mArgument (argument), mRefOp (false), mMemberOp (false)
|
||||
|
|
|
@ -58,7 +58,7 @@ namespace Compiler
|
|||
|
||||
public:
|
||||
|
||||
ExprParser (ErrorHandler& errorHandler, Context& context, Locals& locals,
|
||||
ExprParser (ErrorHandler& errorHandler, const Context& context, Locals& locals,
|
||||
Literals& literals, bool argument = false);
|
||||
///< constructor
|
||||
/// \param argument Parser is used to parse function- or instruction-
|
||||
|
|
|
@ -50,7 +50,7 @@ namespace Compiler
|
|||
}
|
||||
}
|
||||
|
||||
LineParser::LineParser (ErrorHandler& errorHandler, Context& context, Locals& locals,
|
||||
LineParser::LineParser (ErrorHandler& errorHandler, const Context& context, Locals& locals,
|
||||
Literals& literals, std::vector<Interpreter::Type_Code>& code, bool allowExpression)
|
||||
: Parser (errorHandler, context), mLocals (locals), mLiterals (literals), mCode (code),
|
||||
mState (BeginState), mExprParser (errorHandler, context, locals, literals),
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace Compiler
|
|||
|
||||
public:
|
||||
|
||||
LineParser (ErrorHandler& errorHandler, Context& context, Locals& locals,
|
||||
LineParser (ErrorHandler& errorHandler, const Context& context, Locals& locals,
|
||||
Literals& literals, std::vector<Interpreter::Type_Code>& code,
|
||||
bool allowExpression = false);
|
||||
///< \param allowExpression Allow lines consisting of a naked expression
|
||||
|
|
|
@ -52,7 +52,7 @@ namespace Compiler
|
|||
|
||||
// Return context
|
||||
|
||||
Context& Parser::getContext()
|
||||
const Context& Parser::getContext() const
|
||||
{
|
||||
return mContext;
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ namespace Compiler
|
|||
return lowerCase;
|
||||
}
|
||||
|
||||
Parser::Parser (ErrorHandler& errorHandler, Context& context)
|
||||
Parser::Parser (ErrorHandler& errorHandler, const Context& context)
|
||||
: mErrorHandler (errorHandler), mContext (context), mOptional (false), mEmpty (true)
|
||||
{}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace Compiler
|
|||
class Parser
|
||||
{
|
||||
ErrorHandler& mErrorHandler;
|
||||
Context& mContext;
|
||||
const Context& mContext;
|
||||
bool mOptional;
|
||||
bool mEmpty;
|
||||
|
||||
|
@ -38,14 +38,14 @@ namespace Compiler
|
|||
ErrorHandler& getErrorHandler();
|
||||
///< Return error handler
|
||||
|
||||
Context& getContext();
|
||||
const Context& getContext() const;
|
||||
///< Return context
|
||||
|
||||
static std::string toLower (const std::string& name);
|
||||
|
||||
public:
|
||||
|
||||
Parser (ErrorHandler& errorHandler, Context& context);
|
||||
Parser (ErrorHandler& errorHandler, const Context& context);
|
||||
///< constructor
|
||||
|
||||
virtual ~Parser();
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "skipparser.hpp"
|
||||
#include "scanner.hpp"
|
||||
|
||||
Compiler::QuickFileParser::QuickFileParser (ErrorHandler& errorHandler, Context& context,
|
||||
Compiler::QuickFileParser::QuickFileParser (ErrorHandler& errorHandler, const Context& context,
|
||||
Locals& locals)
|
||||
: Parser (errorHandler, context), mDeclarationParser (errorHandler, context, locals)
|
||||
{}
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace Compiler
|
|||
|
||||
public:
|
||||
|
||||
QuickFileParser (ErrorHandler& errorHandler, Context& context, Locals& locals);
|
||||
QuickFileParser (ErrorHandler& errorHandler, const Context& context, Locals& locals);
|
||||
|
||||
virtual bool parseName (const std::string& name, const TokenLoc& loc,
|
||||
Scanner& scanner);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
namespace Compiler
|
||||
{
|
||||
ScriptParser::ScriptParser (ErrorHandler& errorHandler, Context& context,
|
||||
ScriptParser::ScriptParser (ErrorHandler& errorHandler, const Context& context,
|
||||
Locals& locals, bool end)
|
||||
: Parser (errorHandler, context), mOutput (locals),
|
||||
mLineParser (errorHandler, context, locals, mOutput.getLiterals(), mOutput.getCode()),
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace Compiler
|
|||
public:
|
||||
|
||||
/// \param end of script is marked by end keyword.
|
||||
ScriptParser (ErrorHandler& errorHandler, Context& context, Locals& locals,
|
||||
ScriptParser (ErrorHandler& errorHandler, const Context& context, Locals& locals,
|
||||
bool end = false);
|
||||
|
||||
void getCode (std::vector<Interpreter::Type_Code>& code) const;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
namespace Compiler
|
||||
{
|
||||
SkipParser::SkipParser (ErrorHandler& errorHandler, Context& context)
|
||||
SkipParser::SkipParser (ErrorHandler& errorHandler, const Context& context)
|
||||
: Parser (errorHandler, context)
|
||||
{}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace Compiler
|
|||
{
|
||||
public:
|
||||
|
||||
SkipParser (ErrorHandler& errorHandler, Context& context);
|
||||
SkipParser (ErrorHandler& errorHandler, const Context& context);
|
||||
|
||||
virtual bool parseInt (int value, const TokenLoc& loc, Scanner& scanner);
|
||||
///< Handle an int token.
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
namespace Compiler
|
||||
{
|
||||
StringParser::StringParser (ErrorHandler& errorHandler, Context& context, Literals& literals)
|
||||
StringParser::StringParser (ErrorHandler& errorHandler, const Context& context, Literals& literals)
|
||||
: Parser (errorHandler, context), mLiterals (literals), mState (StartState), mSmashCase (false)
|
||||
{
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace Compiler
|
|||
|
||||
public:
|
||||
|
||||
StringParser (ErrorHandler& errorHandler, Context& context, Literals& literals);
|
||||
StringParser (ErrorHandler& errorHandler, const Context& context, Literals& literals);
|
||||
|
||||
virtual bool parseName (const std::string& name, const TokenLoc& loc,
|
||||
Scanner& scanner);
|
||||
|
|
Loading…
Reference in a new issue