add const to DocParser::parse