MCPcopy Create free account
hub / github.com/dhbloo/rapfi / parse

Function parse

Rapfi/external/cpptoml/include/cpptoml.h:1893–1920  ·  view source on GitHub ↗

* Parses the stream this parser was created on until EOF. * @throw parse_exception if there are errors in parsing */

Source from the content-addressed store, hash-verified

1891 * @throw parse_exception if there are errors in parsing
1892 */
1893 std::shared_ptr<table> parse()
1894 {
1895 std::shared_ptr<table> root = make_table();
1896
1897 table* curr_table = root.get();
1898
1899 while (detail::getline(input_, line_))
1900 {
1901 line_number_++;
1902 auto it = line_.begin();
1903 auto end = line_.end();
1904 consume_whitespace(it, end);
1905 if (it == end || *it == '#')
1906 continue;
1907 if (*it == '[')
1908 {
1909 curr_table = root.get();
1910 parse_table(it, end, curr_table);
1911 }
1912 else
1913 {
1914 parse_key_value(it, end, curr_table);
1915 consume_whitespace(it, end);
1916 eol_or_comment(it, end);
1917 }
1918 }
1919 return root;
1920 }
1921
1922 private:
1923#if defined _MSC_VER

Callers

nothing calls this directly

Calls 8

make_tableFunction · 0.85
consume_whitespaceFunction · 0.85
parse_tableFunction · 0.85
parse_key_valueFunction · 0.85
eol_or_commentFunction · 0.85
getMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected