Phasor 2.2.0
Stack VM based Programming Language
Loading...
Searching...
No Matches
CppCompiler.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4#include <filesystem>
5
6namespace Phasor
7{
8
17{
18 public:
19 CppCompiler(int argc, char *argv[]);
20 int run();
21
22 private:
23 struct Args
24 {
25 std::filesystem::path inputFile;
26 std::filesystem::path outputFile;
27 std::filesystem::path mainFile;
28 std::string moduleName;
29 bool verbose = false;
30 bool showHelp = false;
31 std::string compiler;
32 std::string linker;
33 bool run = false;
34 bool headerOnly = false;
35 bool objectOnly = false;
36 bool generateOnly = false;
37 bool noLogo = false;
39
40 bool parseArguments(int argc, char *argv[]);
41 bool showHelp(const std::string &programName);
42 bool generateHeader(const std::filesystem::path &sourcePath, const std::filesystem::path &outputPath);
43 bool generateSource(const std::filesystem::path &sourcePath, const std::filesystem::path &outputPath);
44 bool compileSource(const std::filesystem::path &sourcePath, const std::filesystem::path &outputPath);
45 bool linkObject(const std::filesystem::path &objectPath, const std::filesystem::path &outputPath);
46};
47
48} // namespace Phasor
bool generateSource(const std::filesystem::path &sourcePath, const std::filesystem::path &outputPath)
struct Phasor::CppCompiler::Args m_args
bool parseArguments(int argc, char *argv[])
bool showHelp(const std::string &programName)
bool generateHeader(const std::filesystem::path &sourcePath, const std::filesystem::path &outputPath)
bool linkObject(const std::filesystem::path &objectPath, const std::filesystem::path &outputPath)
bool compileSource(const std::filesystem::path &sourcePath, const std::filesystem::path &outputPath)
CppCompiler(int argc, char *argv[])
The Phasor Programming Language and Runtime.
Definition AST.hpp:8
std::filesystem::path mainFile
std::filesystem::path outputFile
std::filesystem::path inputFile