OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
compilercontext.hpp
Go to the documentation of this file.
1 #ifndef GAME_SCRIPT_COMPILERCONTEXT_H
2 #define GAME_SCRIPT_COMPILERCONTEXT_H
3 
5 
6 namespace MWScript
7 {
9  {
10  public:
11 
12  enum Type
13  {
14  Type_Full, // global, local, targeted
17  };
18 
19  private:
20 
22 
23  public:
24 
25  CompilerContext (Type type);
26 
28  virtual bool canDeclareLocals() const;
29 
31  virtual char getGlobalType (const std::string& name) const;
32 
33  virtual std::pair<char, bool> getMemberType (const std::string& name,
34  const std::string& id) const;
39 
40  virtual bool isId (const std::string& name) const;
42 
43  virtual bool isJournalId (const std::string& name) const;
45  };
46 }
47 
48 #endif
virtual bool isJournalId(const std::string &name) const
Does name match a journal ID?
Definition: compilercontext.cpp:90
Type
Definition: compilercontext.hpp:12
Definition: context.hpp:10
Type mType
Definition: compilercontext.hpp:21
CompilerContext(Type type)
Definition: compilercontext.cpp:19
Definition: compilercontext.hpp:15
virtual bool canDeclareLocals() const
Is the compiler allowed to declare local variables?
Definition: compilercontext.cpp:23
virtual char getGlobalType(const std::string &name) const
'l: long, 's': short, 'f': float, ' ': does not exist.
Definition: compilercontext.cpp:28
Definition: compilercontext.hpp:16
Definition: compilercontext.hpp:14
virtual bool isId(const std::string &name) const
Does name match an ID, that can be referenced?
Definition: compilercontext.cpp:61
virtual std::pair< char, bool > getMemberType(const std::string &name, const std::string &id) const
Definition: compilercontext.cpp:33
const char * name
Definition: crashcatcher.cpp:59
Definition: compilercontext.hpp:8