Remove unnecessary helper function in parser spec