Added generator-dependent compilation and simple passthrough that allows us to have non-cheated emitted, printing c-code for the first time! (no typechecking or anything yet, but we'll get there). It's also still rough.
This commit is contained in:
@@ -13,8 +13,8 @@ enum ASTType {undef, translation_unit, interpreter_directive, import, identifier
|
||||
function, code_block,
|
||||
typed_parameter, expression, boolean_expression, statement,
|
||||
if_statement, while_loop, for_loop, return_statement, assignment_statement, declaration_statement,
|
||||
function_call, value};
|
||||
enum ValueType {none, boolean, integer, floating, double_percision, char_string };
|
||||
if_comp, simple_passthrough, function_call, value};
|
||||
enum ValueType {none, void_type, boolean, integer, floating, double_percision, char_string };
|
||||
|
||||
|
||||
class ASTData {
|
||||
|
||||
@@ -16,6 +16,7 @@ class CGenerator {
|
||||
~CGenerator();
|
||||
std::string generate(NodeTree<ASTData>* from);
|
||||
static std::string ValueTypeToCType(ValueType type);
|
||||
std::string generatorString;
|
||||
private:
|
||||
std::string tabs();
|
||||
int tabLevel;
|
||||
|
||||
Reference in New Issue
Block a user