MCPcopy Create free account
hub / github.com/WheretIB/nullc / parse

Method parse

external/pugixml/pugixml.cpp:1645–1675  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1643 template <typename opt_eol, typename opt_escape> struct strconv_pcdata_impl
1644 {
1645 static char_t* parse(char_t* s)
1646 {
1647 gap g;
1648
1649 while (true)
1650 {
1651 while (!IS_CHARTYPE(*s, ct_parse_pcdata)) ++s;
1652
1653 if (*s == '<') // PCDATA ends here
1654 {
1655 *g.flush(s) = 0;
1656
1657 return s + 1;
1658 }
1659 else if (opt_eol::value && *s == '\r') // Either a single 0x0d or 0x0d 0x0a pair
1660 {
1661 *s++ = '\n'; // replace first one with 0x0a
1662
1663 if (*s == '\n') g.push(s, 1);
1664 }
1665 else if (opt_escape::value && *s == '&')
1666 {
1667 s = strconv_escape(s, g);
1668 }
1669 else if (*s == 0)
1670 {
1671 return s;
1672 }
1673 else ++s;
1674 }
1675 }
1676 };
1677
1678 strconv_pcdata_t get_strconv_pcdata(unsigned int optmask)

Callers

nothing calls this directly

Calls 3

strconv_escapeFunction · 0.85
pushMethod · 0.80
flushMethod · 0.45

Tested by

no test coverage detected