Better compiler invocation style and put all generated files (including dot files) in output folder

This commit is contained in:
Nathan Braswell
2015-03-15 18:41:55 -04:00
parent f1b0d46ca0
commit 15c4a4bf0e
7 changed files with 55 additions and 32 deletions

View File

@@ -6,6 +6,8 @@
#include <iostream>
#include <fstream>
#include <sys/stat.h>
#include "Parser.h"
#include "NodeTree.h"
#include "ASTData.h"
@@ -18,7 +20,7 @@ class ASTTransformation;
class Importer {
public:
Importer(Parser* parserIn, std::vector<std::string> includePaths);
Importer(Parser* parserIn, std::vector<std::string> includePaths, std::string outputName);
~Importer();
void import(std::string fileName);
NodeTree<ASTData>* getUnit(std::string fileName);
@@ -27,6 +29,7 @@ class Importer {
void registerAST(std::string name, NodeTree<ASTData>* ast, NodeTree<Symbol>* syntaxTree);
std::map<std::string, NodeTree<ASTData>*> getASTMap();
private:
std::string outputName;
ASTTransformation *ASTTransformer;
struct importTriplet {
std::string name;
@@ -41,4 +44,4 @@ class Importer {
std::map<std::string, NodeTree<ASTData>*> imported;
};
#endif
#endif

View File

@@ -50,14 +50,4 @@ bool subset(std::set<T> a, std::set<T> b) {
return false;
return true;
}
/*
std::vector<std::string> split(std::string str, char delim) {
std::stringstream stream(str);
std::string item;
std::vector<std::string> results;
while(std::getline(stream, item, delim))
results.push_back(item);
return results;
}
*/
#endif