[rst mode] Remove assertion mechanism

Throwing exceptions is a really bad way to deal with unexpected
syntax in a highlighting mode.

Closes #2805