Tweak the lexer so that '[%s]' gets parsed as three separate tokens,
instead of the closing bracket getting sucked into the format string.
case '@': case '%':
/* stop at the first space, comma, colon or unmatched bracket.
* deals nicely with cases like (%i, %i) or {%i: %i}.
+ * Also: ] and > are never in format strings.
*/
for (end = stream->stream + 1;
end != stream->end && *end != ',' &&
- *end != ':' && *end != '>' && !g_ascii_isspace (*end);
+ *end != ':' && *end != '>' && *end != ']' && !g_ascii_isspace (*end);
end++)
if (*end == '(' || *end == '{')