diff options
author | David Robillard <d@drobilla.net> | 2021-07-09 21:39:31 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-12-02 18:49:07 -0500 |
commit | 31ef2936a1549cdc125c387a8f541d8b70e60c21 (patch) | |
tree | 7c48e3273053c885ccbfa92b7762a7179828080e /include/serd/reader.h | |
parent | 3389cf3e506ad9e8475daf8b1cac0248274849bc (diff) | |
download | serd-31ef2936a1549cdc125c387a8f541d8b70e60c21.tar.gz serd-31ef2936a1549cdc125c387a8f541d8b70e60c21.tar.bz2 serd-31ef2936a1549cdc125c387a8f541d8b70e60c21.zip |
Replace serd_reader_set_strict() with SerdReaderFlags
Diffstat (limited to 'include/serd/reader.h')
-rw-r--r-- | include/serd/reader.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/include/serd/reader.h b/include/serd/reader.h index a2b2698d..5df1acc9 100644 --- a/include/serd/reader.h +++ b/include/serd/reader.h @@ -27,23 +27,22 @@ SERD_BEGIN_DECLS /// Streaming parser that reads a text stream and writes to a statement sink typedef struct SerdReaderImpl SerdReader; +/// Reader options +typedef enum { + SERD_READ_LAX = 1U << 0U, ///< Tolerate invalid input where possible +} SerdReaderFlag; + +/// Bitwise OR of SerdReaderFlag values +typedef uint32_t SerdReaderFlags; + /// Create a new RDF reader SERD_API SerdReader* SERD_ALLOCATED serd_reader_new(SerdWorld* SERD_NONNULL world, SerdSyntax syntax, + SerdReaderFlags flags, const SerdSink* SERD_NONNULL sink); /** - Enable or disable strict parsing. - - The reader is non-strict (lax) by default, which will tolerate URIs with - invalid characters. Setting strict will fail when parsing such files. An - error is printed for invalid input in either case. -*/ -SERD_API void -serd_reader_set_strict(SerdReader* SERD_NONNULL reader, bool strict); - -/** Set a prefix to be added to all blank node identifiers. This is useful when multiple files are to be parsed into the same output (a |