MCPcopy Create free account
hub / github.com/boostorg/parser / get_pending_symtab_ops

Function get_pending_symtab_ops

include/boost/parser/parser.hpp:1861–1882  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1859
1860 template<typename Context, typename T>
1861 decltype(auto) get_pending_symtab_ops(
1862 Context const & context, symbol_parser<T> const & sym_parser)
1863 {
1864 void const * ptr = static_cast<void const *>(&sym_parser);
1865 auto & entry = (context.get_pending_symbol_table_operations())[ptr];
1866 std::vector<detail::symbol_table_operation<T>> * retval = nullptr;
1867 if (entry.visit_) {
1868 retval = std::any_cast<
1869 std::vector<detail::symbol_table_operation<T>>>(
1870 &entry.ops_);
1871 } else {
1872 entry.ops_ = std::vector<detail::symbol_table_operation<T>>{};
1873 retval = std::any_cast<
1874 std::vector<detail::symbol_table_operation<T>>>(
1875 &entry.ops_);
1876 entry.visit_ = [&sym_parser, ops_ptr = retval] {
1877 detail::apply_symbol_table_operations(
1878 sym_parser.initial_elements_, *ops_ptr);
1879 };
1880 }
1881 return *retval;
1882 }
1883
1884 template<>
1885 struct char_subranges<hex_digit_subranges>

Callers 3

insert_for_next_parseMethod · 0.85
erase_for_next_parseMethod · 0.85
clear_for_next_parseMethod · 0.85

Calls 1

Tested by

no test coverage detected