Fixed a ton of stuff with function templates. Works well now. Next up: multiple template types and fixing object definition ordering (both where templates should go and objects with other pointers)

This commit is contained in:
Nathan Braswell
2014-05-19 20:00:35 -04:00
parent b2c61b00f2
commit 39f945940d
8 changed files with 174 additions and 47 deletions

View File

@@ -40,9 +40,14 @@ Importer::~Importer() {
}
NodeTree<ASTData>* Importer::import(std::string fileName) {
std::cout << "\n\nImporting " << fileName << " ";
//Check to see if we've already done it
if (imported.find(fileName) != imported.end())
if (imported.find(fileName) != imported.end()) {
std::cout << "Already Imported!" << std::endl;
return imported[fileName];
}
std::cout << "Not yet imported" << std::endl;
std::ifstream programInFile;
std::ofstream outFile, outFileTransformed, outFileAST;
@@ -126,6 +131,8 @@ NodeTree<ASTData>* Importer::import(std::string fileName) {
imported[fileName] = AST;
std::cout << "Done importing " << fileName << "\n\n" << std::endl;
return AST;
}