diff --git a/include/simdjson.h b/include/simdjson.h index 316a7495..a1a9426a 100644 --- a/include/simdjson.h +++ b/include/simdjson.h @@ -46,48 +46,16 @@ SIMDJSON_DISABLE_UNDESIRED_WARNINGS #include "simdjson/minify.h" #include "simdjson/padded_string.h" #include "simdjson/implementation.h" -#include "simdjson/dom/array.h" -#include "simdjson/dom/document_stream.h" -#include "simdjson/dom/document.h" -#include "simdjson/dom/element.h" -#include "simdjson/dom/object.h" -#include "simdjson/dom/parser.h" -#include "simdjson/dom/serialization.h" - -// Deprecated API -#include "simdjson/dom/jsonparser.h" -#include "simdjson/dom/parsedjson.h" -#include "simdjson/dom/parsedjson_iterator.h" // Inline functions -#include "simdjson/dom/array-inl.h" -#include "simdjson/dom/document_stream-inl.h" -#include "simdjson/dom/document-inl.h" -#include "simdjson/dom/element-inl.h" #include "simdjson/error-inl.h" -#include "simdjson/dom/object-inl.h" #include "simdjson/padded_string-inl.h" -#include "simdjson/dom/parsedjson_iterator-inl.h" -#include "simdjson/dom/parser-inl.h" -#include "simdjson/internal/tape_ref-inl.h" -#include "simdjson/dom/serialization-inl.h" -// Implementation-internal files (must be included before the implementations themselves, to keep -// amalgamation working--otherwise, the first time a file is included, it might be put inside the -// #ifdef SIMDJSON_IMPLEMENTATION_ARM64/FALLBACK/etc., which means the other implementations can't -// compile unless that implementation is turned on). -#include "simdjson/internal/isadetection.h" -#include "simdjson/internal/jsoncharutils_tables.h" -#include "simdjson/internal/numberparsing_tables.h" -#include "simdjson/internal/simdprune_tables.h" +// DOM +#include "simdjson/dom.h" // Implementations -#include "simdjson/arm64.h" -#include "simdjson/haswell.h" -#include "simdjson/westmere.h" -#include "simdjson/ppc64.h" -#include "simdjson/fallback.h" -#include "simdjson/builtin.h" +#include "simdjson/implementations.h" SIMDJSON_POP_DISABLE_WARNINGS diff --git a/include/simdjson/dom.h b/include/simdjson/dom.h new file mode 100644 index 00000000..eba36013 --- /dev/null +++ b/include/simdjson/dom.h @@ -0,0 +1,28 @@ +#ifndef SIMDJSON_DOM_H +#define SIMDJSON_DOM_H + +#include "simdjson/dom/array.h" +#include "simdjson/dom/document_stream.h" +#include "simdjson/dom/document.h" +#include "simdjson/dom/element.h" +#include "simdjson/dom/object.h" +#include "simdjson/dom/parser.h" +#include "simdjson/dom/serialization.h" + +// Deprecated API +#include "simdjson/dom/jsonparser.h" +#include "simdjson/dom/parsedjson.h" +#include "simdjson/dom/parsedjson_iterator.h" + +// Inline functions +#include "simdjson/dom/array-inl.h" +#include "simdjson/dom/document_stream-inl.h" +#include "simdjson/dom/document-inl.h" +#include "simdjson/dom/element-inl.h" +#include "simdjson/dom/object-inl.h" +#include "simdjson/dom/parsedjson_iterator-inl.h" +#include "simdjson/dom/parser-inl.h" +#include "simdjson/internal/tape_ref-inl.h" +#include "simdjson/dom/serialization-inl.h" + +#endif // SIMDJSON_DOM_H diff --git a/include/simdjson/implementations.h b/include/simdjson/implementations.h new file mode 100644 index 00000000..666262e4 --- /dev/null +++ b/include/simdjson/implementations.h @@ -0,0 +1,21 @@ +#ifndef SIMDJSON_IMPLEMENTATIONS_H +#define SIMDJSON_IMPLEMENTATIONS_H + +// Implementation-internal files (must be included before the implementations themselves, to keep +// amalgamation working--otherwise, the first time a file is included, it might be put inside the +// #ifdef SIMDJSON_IMPLEMENTATION_ARM64/FALLBACK/etc., which means the other implementations can't +// compile unless that implementation is turned on). +#include "simdjson/internal/isadetection.h" +#include "simdjson/internal/jsoncharutils_tables.h" +#include "simdjson/internal/numberparsing_tables.h" +#include "simdjson/internal/simdprune_tables.h" + +// Implementations +#include "simdjson/arm64.h" +#include "simdjson/haswell.h" +#include "simdjson/westmere.h" +#include "simdjson/ppc64.h" +#include "simdjson/fallback.h" +#include "simdjson/builtin.h" + +#endif // SIMDJSON_IMPLEMENTATIONS_H \ No newline at end of file