1 #ifndef TAN_INCLUDE_COMPILER_H_
2 #define TAN_INCLUDE_COMPILER_H_
15 class TokenizedSourceFile;
60 void run(
const vector<str> &files);
65 vector<Program *>
parse(
const vector<str> &files);
67 void link(
const vector<str> &input_paths);
93 vector<str> compile_tan(
const vector<str> &files);
97 llvm::TargetMachine *_target_machine =
nullptr;
99 umap<str, Package *> _packages{};
101 enum class AnalyzeStatus : int {
106 umap<str, AnalyzeStatus> _package_status{};
Compile a list of C++ and/or tan source files, and perform linking.
vector< Package * > stage1_analysis(vector< Program * > ps)
Get a set of partially analyzed packages that can be used for cross-package dependency analysis....
Package * get_package(const str &name)
Get a pointer to a Package. Semantic analysis is not guaranteed to be fully performed on it.
static vector< str > import_dirs
Import search directories FIXME: static variable?
void run(const vector< str > &files)
Compile CXX or TAN source files and link their output object files.
vector< Program * > parse(const vector< str > &files)
Parse the corresponding source file, and build AST.
static vector< str > resolve_package_import(const str &callee_path, const str &import_name)
Get a list of possible files that corresponds to an import. Check PACKAGES.md.
void register_package(const str &name, Package *package)
Register a Package that has been spotted from source files, with top-level context stored inside.
Compilation configuration.