Like so?:

```C++
if (sw == NULL)
{
    error("case range not in switch statement");
    Statements *statements = new Statements();
    return new CompoundStatement(loc, statements);
}
```