2013-11-01 02:52:18 -04:00
|
|
|
#ifndef CGENERATOR_H
|
|
|
|
|
#define CGENERATOR_H
|
|
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
|
|
#include "NodeTree.h"
|
|
|
|
|
#include "ASTData.h"
|
|
|
|
|
|
2013-12-19 10:39:36 -06:00
|
|
|
#include "util.h"
|
|
|
|
|
|
2013-11-01 02:52:18 -04:00
|
|
|
|
|
|
|
|
class CGenerator {
|
|
|
|
|
public:
|
|
|
|
|
CGenerator();
|
|
|
|
|
~CGenerator();
|
|
|
|
|
std::string generate(NodeTree<ASTData>* from);
|
|
|
|
|
static std::string ValueTypeToCType(ValueType type);
|
|
|
|
|
private:
|
|
|
|
|
std::string tabs();
|
|
|
|
|
int tabLevel;
|
|
|
|
|
};
|
|
|
|
|
#endif
|