1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-12 03:36:32 +00:00
OpenMW/components/compiler/context.hpp

40 lines
932 B
C++
Raw Normal View History

2010-06-27 17:20:21 +00:00
#ifndef COMPILER_CONTEXT_H_INCLUDED
#define COMPILER_CONTEXT_H_INCLUDED
#include <string>
2010-06-27 17:20:21 +00:00
namespace Compiler
{
2010-07-03 07:54:01 +00:00
class Extensions;
2010-06-27 17:20:21 +00:00
class Context
{
2010-07-03 07:54:01 +00:00
const Extensions *mExtensions;
public:
2010-07-03 07:54:01 +00:00
Context() : mExtensions (0) {}
virtual ~Context() {}
virtual bool canDeclareLocals() const = 0;
///< Is the compiler allowed to declare local variables?
2010-07-03 07:54:01 +00:00
void setExtensions (const Extensions *extensions = 0)
{
mExtensions = extensions;
}
const Extensions *getExtensions() const
{
return mExtensions;
}
virtual char getGlobalType (const std::string& name) const = 0;
2010-07-06 10:06:50 +00:00
///< 'l: long, 's': short, 'f': float, ' ': does not exist.
2010-06-27 17:20:21 +00:00
};
}
#endif