#ifndef QLOW_DRIVER_H #define QLOW_DRIVER_H #include #include #include #include #include #include "Parser.h" namespace qlow { struct Options; class Driver; namespace ast { struct Ast; struct AstObject; } } struct qlow::Options { bool emitAssembly; bool emitLlvm; std::string outfile = "a.out"; std::vector infiles; int optLevel = 0; static Options parseOptions(int argc, char** argv); }; class qlow::Driver { Options options; std::unique_ptr ast = nullptr; public: Driver(void) = delete; Driver(int argc, char** argv); int run(void); bool parseStage(void); qlow::ast::Ast parseFile(FILE* file, const std::string& filename); }; #endif // QLOW_DRIVER_H