fixes #140: block are closed by other closing delimiters (`]`, `}`, `)`)

This comes with a pretty sizable rewrite of the preprocessor that
hopefully makes its operation a little bit clearer.