You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
957 B
C++
45 lines
957 B
C++
15 years ago
|
#ifndef COMPILER_OUTPUT_H_INCLUDED
|
||
|
#define COMPILER_OUTPUT_H_INCLUDED
|
||
|
|
||
|
#include "literals.hpp"
|
||
|
|
||
|
#include <vector>
|
||
|
|
||
|
#include <components/interpreter/types.hpp>
|
||
|
|
||
|
namespace Compiler
|
||
|
{
|
||
|
class Locals;
|
||
|
|
||
|
class Output
|
||
|
{
|
||
|
Literals mLiterals;
|
||
|
std::vector<Interpreter::Type_Code> mCode;
|
||
|
Locals& mLocals;
|
||
|
|
||
|
public:
|
||
|
|
||
|
Output (Locals& locals);
|
||
|
|
||
|
void getCode (std::vector<Interpreter::Type_Code>& code) const;
|
||
|
///< store generated code in \æ code.
|
||
|
|
||
|
const Literals& getLiterals() const;
|
||
|
|
||
|
const Locals& getLocals() const;
|
||
|
|
||
|
const std::vector<Interpreter::Type_Code>& getCode() const;
|
||
|
|
||
|
Literals& getLiterals();
|
||
|
|
||
|
std::vector<Interpreter::Type_Code>& getCode();
|
||
|
|
||
|
Locals& getLocals();
|
||
|
|
||
|
void clear();
|
||
|
};
|
||
|
}
|
||
|
|
||
|
#endif
|
||
|
|