OpenMW
|
00001 #ifndef GAME_SCRIPT_COMPILERCONTEXT_H 00002 #define GAME_SCRIPT_COMPILERCONTEXT_H 00003 00004 #include <components/compiler/context.hpp> 00005 00006 namespace MWScript 00007 { 00008 class CompilerContext : public Compiler::Context 00009 { 00010 public: 00011 00012 enum Type 00013 { 00014 Type_Full, // global, local, targetted 00015 Type_Dialgoue, 00016 Type_Console 00017 }; 00018 00019 private: 00020 00021 Type mType; 00022 00023 public: 00024 00025 CompilerContext (Type type); 00026 00028 virtual bool canDeclareLocals() const; 00029 00031 virtual char getGlobalType (const std::string& name) const; 00032 00033 virtual char getMemberType (const std::string& name, const std::string& id) const; 00035 00036 virtual bool isId (const std::string& name) const; 00038 }; 00039 } 00040 00041 #endif