[Geany-Devel] fix for regex error message parsing
dimitar.zhekov at xxxxx
Tue Jan 21 18:42:13 UTC 2014
As discussed in the "Compiler tab suggestions" thread, Geany regex
error message parsing is buggy - it fetches the matching strings by
index, but GRegex indexes all subgroups, returning empty string for
the non-matching ones. So using | for alternatives does not work,
and parsing a set of strings like:
filename:line:column: warning: passing argument # of 'function' from
incompatible pointer type
In file included from filename:line,
filename:line:column: note: expected 'foo' but argument is of type 'bar'
is either impossible, or requires a very complex expression.
This is a regression caused by our switch to GRegex.
Fix attached. Of course, it's a simple loop skipping the non-matching
groups by their start position. Tested with both filename:line and
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1210 bytes
Desc: not available
More information about the Devel