Sha256: b97f928daf729ba4dce9a9be80b6df66d758080d8cd73292867387cf27727598

Contents?: true

Size: 1.59 KB

Versions: 34

Compression:

Stored size: 1.59 KB

Contents

// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey
// Please see LICENSE for license or visit https://github.com/taocpp/json/

#ifndef TAO_JSON_JAXN_EVENTS_FROM_INPUT_HPP
#define TAO_JSON_JAXN_EVENTS_FROM_INPUT_HPP

#include <utility>

#include "../../external/pegtl/parse.hpp"

#include "../internal/action.hpp"
#include "../internal/errors.hpp"
#include "../internal/grammar.hpp"

namespace tao::json::jaxn::events
{
   // Events producers that parse a JAXN string representation from a PEGTL input (or something compatible).

   template< typename Consumer, typename Input >
   void from_input( Consumer& consumer, Input&& in )
   {
      pegtl::parse< internal::grammar, internal::action, internal::errors >( std::forward< Input >( in ), consumer );
   }

   template< typename Consumer, typename Input >
   void from_input_embedded( Consumer& consumer, Input&& in )
   {
      pegtl::parse< internal::embedded, internal::action, internal::errors >( std::forward< Input >( in ), consumer );
   }

   template< typename Consumer, typename Outer, typename Input >
   void from_input_nested( Consumer& consumer, const Outer& oi, Input&& in )
   {
      pegtl::parse_nested< internal::grammar, internal::action, internal::errors >( oi, std::forward< Input >( in ), consumer );
   }

   template< typename Consumer, typename Outer, typename Input >
   void from_input_embedded_nested( Consumer& consumer, const Outer& oi, Input&& in )
   {
      pegtl::parse_nested< internal::embedded, internal::action, internal::errors >( oi, std::forward< Input >( in ), consumer );
   }

}  // namespace tao::json::jaxn::events

#endif

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
couchbase-3.2.0-universal-darwin-20 ext/third_party/json/include/tao/json/jaxn/events/from_input.hpp
couchbase-3.2.0 ext/third_party/json/include/tao/json/jaxn/events/from_input.hpp
couchbase-3.1.1 ext/third_party/json/include/tao/json/jaxn/events/from_input.hpp
couchbase-3.1.1-universal-darwin-20 ext/third_party/json/include/tao/json/jaxn/events/from_input.hpp
couchbase-3.1.0 ext/third_party/json/include/tao/json/jaxn/events/from_input.hpp
couchbase-3.0.3 ext/third_party/json/include/tao/json/jaxn/events/from_input.hpp
couchbase-3.0.3-universal-darwin-20 ext/third_party/json/include/tao/json/jaxn/events/from_input.hpp
couchbase-3.0.2 ext/third_party/json/include/tao/json/jaxn/events/from_input.hpp
couchbase-3.0.1-universal-darwin-19 ext/third_party/json/include/tao/json/jaxn/events/from_input.hpp
couchbase-3.0.1 ext/third_party/json/include/tao/json/jaxn/events/from_input.hpp
couchbase-3.0.0-universal-darwin-19 ext/third_party/json/include/tao/json/jaxn/events/from_input.hpp
couchbase-3.0.0 ext/third_party/json/include/tao/json/jaxn/events/from_input.hpp
couchbase-3.0.0.beta.1-universal-darwin-19 ext/third_party/json/include/tao/json/jaxn/events/from_input.hpp
couchbase-3.0.0.beta.1 ext/third_party/json/include/tao/json/jaxn/events/from_input.hpp
couchbase-3.0.0.alpha.5-x86_64-linux ext/third_party/json/include/tao/json/jaxn/events/from_input.hpp
couchbase-3.0.0.alpha.5-universal-darwin-19 ext/third_party/json/include/tao/json/jaxn/events/from_input.hpp
couchbase-3.0.0.alpha.5-x86_64-darwin-19 ext/third_party/json/include/tao/json/jaxn/events/from_input.hpp
couchbase-3.0.0.alpha.5 ext/third_party/json/include/tao/json/jaxn/events/from_input.hpp
couchbase-3.0.0.alpha.4-x86_64-linux ext/third_party/json/include/tao/json/jaxn/events/from_input.hpp
couchbase-3.0.0.alpha.4-x86_64-darwin-19 ext/third_party/json/include/tao/json/jaxn/events/from_input.hpp