ceylon/ceylon-spec — pull request #1143 by lucaswerkmeister (2014-11-15 15:01:54+00:00)
Title: Fix NullPointerException when parsing incomplete if expression

The grammar checks if the thenElseClauses rule returned conditions, but not an if clause to attach them to; if that is the case, a fake if clause is created so the conditions can be attached to it. The grammar then used to proceed to unconditionally attach the conditions to the if clause.

In the event that the thenElseClauses rule returned neither an if clause nor conditions – as in the following code
```ceylon
Anything a = if;
```
– the grammar would still attempt to attach the null conditions to the null if clause, resulting in an NPE.

Easily fixed by creating the fake if clause regardless of whether there are conditions to attach or not.