Fix the mc.ext.ini parser
This commit is contained in:
+2
-3
@@ -45,14 +45,13 @@ unordered_map<string, unordered_map<string, string>> sections;
|
||||
fun expand_command (string command) -> pair<string, string> {
|
||||
regex re_sequence {R"(%(%|[[:alpha:]]*\{([^}]*)\}|[[:alpha:]]+))"};
|
||||
regex re_name {R"([^{}]*)"};
|
||||
regex re_parameter {R"([^,]+")"};
|
||||
regex re_parameter {R"([^,]+)"};
|
||||
string kind, out, pipe; smatch m;
|
||||
while (regex_search (command, m, re_sequence)) {
|
||||
out.append (m.prefix ());
|
||||
auto seq = m.str (1);
|
||||
auto seq = m.str (1), argument = m.str (2);
|
||||
command = m.suffix ();
|
||||
|
||||
string argument = m.str (2);
|
||||
if (regex_search (seq, m, re_name))
|
||||
seq = m.str ();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user