MCPcopy Create free account
hub / github.com/MyGUI/mygui / parse

Method parse

Tools/EditorFramework/pugixml.cpp:2022–2055  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2020struct strconv_pcdata_impl
2021{
2022 static char_t* parse(char_t* s)
2023 {
2024 gap g;
2025
2026 while (true)
2027 {
2028 while (!PUGI__IS_CHARTYPE(*s, ct_parse_pcdata))
2029 ++s;
2030
2031 if (*s == '<') // PCDATA ends here
2032 {
2033 *g.flush(s) = 0;
2034
2035 return s + 1;
2036 }
2037 else if (opt_eol::value && *s == '\r') // Either a single 0x0d or 0x0d 0x0a pair
2038 {
2039 *s++ = '\n'; // replace first one with 0x0a
2040
2041 if (*s == '\n')
2042 g.push(s, 1);
2043 }
2044 else if (opt_escape::value && *s == '&')
2045 {
2046 s = strconv_escape(s, g);
2047 }
2048 else if (*s == 0)
2049 {
2050 return s;
2051 }
2052 else
2053 ++s;
2054 }
2055 }
2056};
2057
2058PUGI__FN strconv_pcdata_t get_strconv_pcdata(unsigned int optmask)

Callers

nothing calls this directly

Calls 3

strconv_escapeFunction · 0.70
flushMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected