Ok. Looking at this, it seems better than the previous parser. We could always revisit this later on and swap this parser out for a pegjs or other parser or something.