|
MimIR 0.1
MimIR is my Intermediate Representation
|
Functions | |
| std::optional< fs::path > | path_to_curr_exe () |
Yields std::nullopt if an error occurred. | |
| std::string | exec (std::string cmd) |
Executes command cmd. | |
| std::string | find_cmd (std::string) |
| int | system (std::string) |
Wraps std::system and makes the return value usable. | |
| int | run (std::string cmd, std::string args={}) |
Wraps sys::system and puts .exe at the back (Windows) and ./ at the front (otherwise) of cmd. | |
| std::string | escape (const std::filesystem::path &path) |
Returns the path as std::string and escapes all whitespaces with backslash. | |
| std::string mim::sys::escape | ( | const std::filesystem::path & | path | ) |
| std::string mim::sys::exec | ( | std::string | cmd | ) |
Executes command cmd.
Definition at line 56 of file sys.cpp.
References mim::error().
Referenced by find_cmd().
| std::string mim::sys::find_cmd | ( | std::string | cmd | ) |
| std::optional< fs::path > mim::sys::path_to_curr_exe | ( | ) |
Yields std::nullopt if an error occurred.
Definition at line 28 of file sys.cpp.
Referenced by mim::Driver::Driver().
| int mim::sys::run | ( | std::string | cmd, |
| std::string | args = {} ) |
Wraps sys::system and puts .exe at the back (Windows) and ./ at the front (otherwise) of cmd.
Definition at line 77 of file sys.cpp.
References system().
Referenced by mim::ll::compile_and_run().
| int mim::sys::system | ( | std::string | cmd | ) |
Wraps std::system and makes the return value usable.
Definition at line 71 of file sys.cpp.
Referenced by mim::ll::compile(), and run().