[Development] look-behind assertions in syntax HL?
Matthew Woehlke
mw_triad at users.sourceforge.net
Fri Feb 14 18:25:26 CET 2014
On 2014-02-14 07:12, Giuseppe D'Angelo wrote:
> On 13 February 2014 18:52, Matthew Woehlke wrote:
>>> Why does the Qt5 QRegExp documentation not mention QRegularExpression?
>
> Because it's an oversight, I guess... patches for the docs are more
> than welcome! :)
Naturally :-). Comments like the above are as much "hey, did you know
that..." as anything. Don't know if I'd have time to patch it though.
> (The big picture is that QRegularExpression is not a 1:1 drop in
> replacement for QRegExp. Not only the Perl-compatible regexs are
> significantly different, it doesn't support the other match types
> supported by QRegExp (such as substring or UNIX wildcards)
Sure; it was the way it Milian presented it as much as anything that
caused me to feel there should be a cross-mention.
That said... is there any technical reason why QRegExp couldn't sprout a
PCRE expression type, that would use QRegularExpression internally? That
would neatly solve the expression types problem (though
QRegularExpression would still have a better API...). And also everyone
already supporting QRegExp would suddenly get PCRE support "for free".
And in fact, back to the original question, I think this would be a Very
Good Thing for kate, in order to not have to suddenly port every HL in
existence to PCRE's. One, kate could continue to use QRegExp (less API
change), and two, could add a way for HL's to specify at a file- or even
rule-level which syntax to use, with the default being "classic"
QRegExp. That way HL's opt in to the new PCRE's, but old HL's would
continue to work.
--
Matthew
More information about the Development
mailing list