parser: Refactor the migraine-inducing parser::error() implementation a bit

Reading so many parentheses and string literals in the same expression
is killing my brain and I'm not done with this code yet.