Description
Hi, I've come across a corner case where asyncify list parsing is failing with an error:
Fatal: Asyncify: failed to parse lists
The list parsing mechanism is attempting to calculate nesting operators from the code:
Handles bracketing in a list initially split by ",", but the list may contain nested ","s. For example,
void foo(int, double)
must be kept together because of the "(". Likewise, "{", "<", "[" are handled.
The implementation performs simple nesting counting:
for (const char c : part) {
if (c == '(' || c == '<' || c == '[' || c == '{') {
nesting++;
} else if (c == ')' || c == '>' || c == ']' || c == '}') {
nesting--;
}
}
This doesn't work for the function XStream::operator>(int&)
. Obviously, the nesting will be -1 at the end, and a fatal error will occur.
I don't have an idea on how to easily fix this. Moreover, I've been using asyncify for a long time, and this list format is hard to maintain. I think that using a one-line-one-function file format is much easier to maintain and will not have this issue.
What do you think? Any suggestion how to fix this?