Add detection for partial parsing of expressions.

With test.