1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-25 06:35:30 +00:00
OpenMW/apps/openmw/mwscript/compilercontext.hpp

38 lines
761 B
C++
Raw Normal View History

2010-07-02 17:21:27 +02:00
#ifndef GAME_SCRIPT_COMPILERCONTEXT_H
#define GAME_SCRIPT_COMPILERCONTEXT_H
#include <components/compiler/context.hpp>
namespace MWScript
{
class CompilerContext : public Compiler::Context
{
public:
enum Type
{
Type_Full, // global, local, targetted
Type_Dialgoue,
Type_Console
};
private:
Type mType;
public:
CompilerContext (Type type) : mType (type) {}
// Is the compiler allowed to declare local variables?
virtual bool canDeclareLocals() const
{
return mType==Type_Full;
}
2010-07-02 17:21:27 +02:00
};
}
#endif