Simple Templates work! Even Templates in other files work. Happy day

This commit is contained in:
Nathan Braswell
2014-05-10 19:28:36 -04:00
parent 5022fc0802
commit 2a4edf9afd
5 changed files with 34 additions and 17 deletions

View File

@@ -26,6 +26,7 @@ class ASTTransformation: public NodeTransformation<Symbol,ASTData> {
private:
Importer * importer;
std::map<std::string, std::vector<NodeTree<ASTData>*>> languageLevelScope;
NodeTree<ASTData>* topScope; //maintained for templates that need to add themselves to the top scope no matter where they are instantiated
};
#endif

View File

@@ -20,7 +20,7 @@ class CGenerator {
std::string generate(NodeTree<ASTData>* from, NodeTree<ASTData>* enclosingObject = NULL);
static std::string ValueTypeToCType(Type *type);
static std::string ValueTypeToCTypeDecoration(Type *type);
static std::string CifyFunctionName(std::string name);
static std::string CifyName(std::string name);
std::string generateObjectMethod(NodeTree<ASTData>* enclosingObject, NodeTree<ASTData>* from);
std::string generatorString;