7 std::string indent(indentwidth,
' ');
8 std::string indent2(indentwidth + 8,
' ');
9 std::string indent3(indentwidth + 16,
' ');
10 std::cout << indent <<
"union, " << std::endl;
11 std::cout << indent2 <<
"funcs: {\n";
12 funcs_m.front()->print(indentwidth + 16);
13 for (
unsigned int i = 1; i <
funcs_m.size(); ++i) {
14 std::cout <<
"\n" << indent3 <<
"," << std::endl;
15 funcs_m[i]->print(indentwidth + 16);
17 std::cout <<
"\n" << indent2 <<
"} ";
31 unin->
funcs_m.push_back(
nullptr);
34 std::regex argumentList(
"(,[a-z]+\\(.*)");
35 std::regex endParenthesis(
"\\)(.*)");
38 std::string str(it, end);
39 while (std::regex_match(str, what, argumentList)) {
41 unin->
funcs_m.push_back(
nullptr);
43 if (!
parse(it2, end, unin->
funcs_m.back()))
return false;
46 str = std::string(it, end);
49 str = std::string(it, end);
50 if (!std::regex_match(str, what, endParenthesis))
return false;
52 std::string fullMatch = what[0];
53 std::string rest = what[1];
55 it += (fullMatch.size() - rest.size());