Content which is incomplete as a generator expression could cause
segfaults by advancing an iterator beyond end() and dereferencing
it. Such incomplete generator expressions should be treated as
plain text instead.
The rationale is similar to that in commit b3d8f5da (GenEx: Parse comma
after colon tokens specially, 2012-10-04), in that colon tokens should
not be parsed as identifier-argument delimiters after the first colon.
Otherwise the comma is treated as plain text by ParseContent.
$<STREQUAL:,> should be valid and true.
$<STREQUAL:,something> should be valid and false.
$<STREQUAL:,,> should be non-valid as it is 3 parameters.
$<STREQUAL:something,,> should be non-valid as it is 3 parameters.
Additionally, this allows reporting the correct error for other
expressions. For example $<TARGET_PROPERTY:,> should be invalid
because it has an empty target and empty property. It shouldn't
attempt to read the property ',' on the 'implicit this' target.
Like the special case for commas, this ensures that the colon only has
special meaning as the delimiter between the identifier and the
parameters of a particular expression, but constructs such as
INCLUDE_DIRECTORIES "$<1:C:\foo>"
are legal.
The expressions may be parsed and then cached and evaluated multiple
times. They are evaluated lazily so that literals such as ',' can be
treated as universal parameter separators, and can be processed from
results without appearing literally, and without interfering with the
parsing/evaluation of the entire expression.