| 1993 | // global functions |
| 1994 | |
| 1995 | bool parseFromStream(CharReader::Factory const& fact, IStream& sin, Value* root, |
| 1996 | String* errs) { |
| 1997 | OStringStream ssin; |
| 1998 | ssin << sin.rdbuf(); |
| 1999 | String doc = std::move(ssin).str(); |
| 2000 | char const* begin = doc.data(); |
| 2001 | char const* end = begin + doc.size(); |
| 2002 | // Note that we do not actually need a null-terminator. |
| 2003 | CharReaderPtr const reader(fact.newCharReader()); |
| 2004 | return reader->parse(begin, end, root, errs); |
| 2005 | } |
| 2006 | |
| 2007 | IStream& operator>>(IStream& sin, Value& root) { |
| 2008 | CharReaderBuilder b; |
no test coverage detected
searching dependent graphs…