mirror of
https://github.com/simdjson/simdjson
synced 2026-06-08 17:27:07 +00:00
Make tape_builder primary entry point to stage 2
This commit is contained in:
@@ -315,22 +315,17 @@ SIMDJSON_WARN_UNUSED bool implementation::validate_utf8(const char *buf, size_t
|
||||
//
|
||||
#include "fallback/stringparsing.h"
|
||||
#include "fallback/numberparsing.h"
|
||||
#include "generic/stage2/structural_parser.h"
|
||||
#include "generic/stage2/tape_builder.h"
|
||||
|
||||
namespace {
|
||||
namespace SIMDJSON_IMPLEMENTATION {
|
||||
|
||||
SIMDJSON_WARN_UNUSED error_code dom_parser_implementation::stage2(dom::document &_doc) noexcept {
|
||||
doc = &_doc;
|
||||
stage2::tape_builder builder(*doc);
|
||||
return stage2::structural_parser::parse<false>(*this, builder);
|
||||
return stage2::tape_builder::parse_document<false>(*this, _doc);
|
||||
}
|
||||
|
||||
SIMDJSON_WARN_UNUSED error_code dom_parser_implementation::stage2_next(dom::document &_doc) noexcept {
|
||||
doc = &_doc;
|
||||
stage2::tape_builder builder(_doc);
|
||||
return stage2::structural_parser::parse<true>(*this, builder);
|
||||
return stage2::tape_builder::parse_document<true>(*this, _doc);
|
||||
}
|
||||
|
||||
SIMDJSON_WARN_UNUSED error_code dom_parser_implementation::parse(const uint8_t *_buf, size_t _len, dom::document &_doc) noexcept {
|
||||
|
||||
Reference in New Issue
Block a user