Remove SUCCESS_AND_HAS_MORE (internal only value)

This commit is contained in:
John Keiser 2020-06-04 18:28:24 -07:00
parent 3e226795f0
commit d43a4e9df9
3 changed files with 1 additions and 4 deletions

View File

@ -11,7 +11,6 @@ namespace simdjson {
*/
enum error_code {
SUCCESS = 0, ///< No error
SUCCESS_AND_HAS_MORE, ///< @private No error and buffer still has more data
CAPACITY, ///< This parser can't support a document that big
MEMALLOC, ///< Error allocating memory, most likely out of memory
TAPE_ERROR, ///< Something went wrong while writing to the tape (stage 2), this is a generic error

View File

@ -76,8 +76,7 @@ public:
* Overridden by each implementation.
*
* @param doc The document to output to.
* @param next_json The next structural index. Start this at 0 the first time, and it will be updated to the next value to pass each time.
* @return The error code, SUCCESS if there was no error, or SUCCESS_AND_HAS_MORE if there was no error and stage2 can be called again.
* @return The error code, SUCCESS if there was no error, or EMPTY if all documents have been parsed.
*/
WARN_UNUSED virtual error_code stage2_next(dom::document &doc) noexcept = 0;

View File

@ -5,7 +5,6 @@ namespace internal {
SIMDJSON_DLLIMPORTEXPORT const error_code_info error_codes[] {
{ SUCCESS, "No error" },
{ SUCCESS_AND_HAS_MORE, "No error and buffer still has more data" },
{ CAPACITY, "This parser can't support a document that big" },
{ MEMALLOC, "Error allocating memory, we're most likely out of memory" },
{ TAPE_ERROR, "The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc." },