#ifndef __IMPORTER__H_ #define __IMPORTER__H_ #include #include #include #include #include #include "Parser.h" #include "NodeTree.h" #include "ASTData.h" #include "Symbol.h" #include "RemovalTransformation.h" #include "CollapseTransformation.h" #include "ASTTransformation.h" class ASTTransformation; class Importer { public: Importer(Parser* parserIn, std::vector includePaths, std::string outputName, bool only_parseIn = false); ~Importer(); void import(std::string fileName); NodeTree* getUnit(std::string fileName); NodeTree* importFirstPass(std::string fileName); NodeTree* parseAndTrim(std::string fileName); void registerAST(std::string name, NodeTree* ast, NodeTree* syntaxTree); std::map*> getASTMap(); private: std::string outputName; ASTTransformation *ASTTransformer; struct importTriplet { std::string name; NodeTree* ast; NodeTree* syntaxTree; }; bool only_parse; std::vector importedTrips; std::vector includePaths; Parser* parser; std::vector removeSymbols; std::vector collapseSymbols; std::map*> imported; }; #endif