2010-06-28 14:48:19 +00:00
|
|
|
#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
|
|
|
|
{
|
2022-09-22 18:26:05 +00:00
|
|
|
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 \a 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();
|
2010-06-28 14:48:19 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|