2023-08-27 17:55:04 +00:00
|
|
|
#include <iostream>
|
2023-08-30 20:54:59 +00:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include "project.h"
|
2023-08-27 17:55:04 +00:00
|
|
|
|
|
|
|
int main(int argc, char *argv[]) {
|
2023-08-30 20:54:59 +00:00
|
|
|
std::string firstArg;
|
|
|
|
if (argc > 1)
|
|
|
|
firstArg = argv[1];
|
|
|
|
else
|
|
|
|
firstArg = "./";
|
|
|
|
|
|
|
|
Project root(firstArg);
|
|
|
|
bool success = root.read();
|
|
|
|
|
|
|
|
if (!success) {
|
|
|
|
Project::Log log(root.getLog());
|
|
|
|
for (const Project::LogMessage& msg : log)
|
|
|
|
std::cout << msg << std::endl;
|
|
|
|
|
|
|
|
return -1;
|
|
|
|
} else {
|
|
|
|
std::cout << "successfully parsed project " << root.getName() << std::endl;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-08-27 17:55:04 +00:00
|
|
|
return 0;
|
|
|
|
}
|