Significant work on templates. They should be close to working now (for single replacement). However, they do not show up in the global scope the the C generator can't see them. Plus, their names will have to be Cified.

This commit is contained in:
Nathan Braswell
2014-05-09 02:56:55 -04:00
parent 5de2ff58bb
commit 5022fc0802
6 changed files with 130 additions and 77 deletions

View File

@@ -13,7 +13,7 @@ class ASTData;
#include "ASTData.h"
#include "util.h"
enum ValueType {none, void_type, boolean, integer, floating, double_percision, character };
enum ValueType {none, template_type, void_type, boolean, integer, floating, double_percision, character };
class Type {
@@ -24,6 +24,7 @@ class Type {
Type(NodeTree<ASTData>* typeDefinitionIn);
Type(NodeTree<ASTData>* typeDefinitionIn, int indirectionIn);
Type(ValueType typeIn, NodeTree<ASTData>* typeDefinitionIn, int indirectionIn);
Type(ValueType typeIn, NodeTree<Symbol>* templateDefinitionIn);
~Type();
bool const operator==(const Type &other)const;
bool const operator!=(const Type &other)const;
@@ -32,6 +33,7 @@ class Type {
ValueType baseType;
NodeTree<ASTData>* typeDefinition;
int indirection;
NodeTree<Symbol>* templateDefinition;
private:
};