#ifndef WILLOWC_INCLUDE_COMPILER_HPP #define WILLOWC_INCLUDE_COMPILER_HPP #include #include #include namespace willowc { class Compiler { public: struct Options { std::string filename; bool use_stdin; willow::Severity log_level; }; Compiler(); Compiler(const Compiler &) = delete; Compiler &operator=(const Compiler &) = delete; willow::LogicalResult addSourceFile(const std::string &path); willow::LogicalResult addStdIn(); // TODO void run(); void compile(FileID file); void setLogLevel(willow::Severity sev) { log_level_ = sev; } size_t numFiles() { return sourcemanager_.numFiles(); } private: SourceManager sourcemanager_; willow::Severity log_level_; willow::DiagnosticEngine diagnostic_engine_; void emitDiagnostic(const willow::Diagnostic &d); }; }; // namespace willowc #endif // WILLOWC_INCLUDE_COMPILER_HPP