Simplify the compound statement parser

The parser now uses an if-statement instead of a try-catch block. This is
simpler and thus less error-prone.