MCPcopy Create free account
hub / github.com/BoomingTech/Piccolo / main

Function main

engine/source/meta_parser/parser/main.cpp:11–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9 std::string show_errors);
10
11int main(int argc, char* argv[])
12{
13 auto start_time = std::chrono::system_clock::now();
14 int result = 0;
15
16 if (argv[1] != nullptr && argv[2] != nullptr && argv[3] != nullptr && argv[4] != nullptr && argv[5] != nullptr &&
17 argv[6] != nullptr)
18 {
19 MetaParser::prepare();
20
21 result = parse(argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]);
22
23 auto duration_time = std::chrono::system_clock::now() - start_time;
24 std::cout << "Completed in " << std::chrono::duration_cast<std::chrono::milliseconds>(duration_time).count()
25 << "ms" << std::endl;
26 return result;
27 }
28 else
29 {
30 std::cerr << "Arguments parse error!" << std::endl
31 << "Please call the tool like this:" << std::endl
32 << "meta_parser project_file_name include_file_name_to_generate project_base_directory "
33 "sys_include_directory module_name showErrors(0 or 1)"
34 << std::endl
35 << std::endl;
36 return -1;
37 }
38
39 return 0;
40}
41
42int parse(std::string project_input_file_name,
43 std::string source_include_file_name,

Callers

nothing calls this directly

Calls 2

parseFunction · 0.70
countMethod · 0.45

Tested by

no test coverage detected