Mostly implemented Simultaneous Declaration, only template instantation during pass 2 remains to be implemented

This commit is contained in:
Nathan Braswell
2014-05-24 14:04:32 -04:00
parent 0f6b6c0c67
commit ae9e652f1e
10 changed files with 461 additions and 30 deletions

View File

@@ -14,13 +14,26 @@
#include "CollapseTransformation.h"
#include "ASTTransformation.h"
class ASTTransformation;
class Importer {
public:
Importer(Parser* parserIn, std::vector<std::string> includePaths);
~Importer();
NodeTree<ASTData>* import(std::string fileName);
void import(std::string fileName);
NodeTree<ASTData>* getUnit(std::string fileName);
NodeTree<ASTData>* importFirstPass(std::string fileName);
NodeTree<Symbol>* parseAndTrim(std::string fileName);
void registerAST(std::string name, NodeTree<ASTData>* ast, NodeTree<Symbol>* syntaxTree);
std::map<std::string, NodeTree<ASTData>*> getASTMap();
private:
ASTTransformation *ASTTransformer;
struct importTriplet {
std::string name;
NodeTree<ASTData>* ast;
NodeTree<Symbol>* syntaxTree;
};
std::vector<importTriplet> importedTrips;
std::vector<std::string> includePaths;
Parser* parser;
std::vector<Symbol> removeSymbols;