aboutsummaryrefslogtreecommitdiffstats
path: root/include/serd
diff options
context:
space:
mode:
Diffstat (limited to 'include/serd')
-rw-r--r--include/serd/serd.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h
index efa48543..fad9d070 100644
--- a/include/serd/serd.h
+++ b/include/serd/serd.h
@@ -217,6 +217,7 @@ typedef enum {
SERD_ERR_BAD_CALL, ///< Invalid call
SERD_ERR_BAD_URI, ///< Invalid or unresolved URI
SERD_ERR_BAD_INDEX, ///< No optimal model index available
+ SERD_ERR_INVALID, ///< Invalid data
} SerdStatus;
/**
@@ -1939,6 +1940,32 @@ serd_sink_write_end(const SerdSink* SERD_NONNULL sink,
/**
@}
+ @defgroup serd_canon Canon
+ @{
+*/
+
+/// Flags that control canonical node transformation
+typedef enum {
+ SERD_CANON_LAX = 1u << 0u, ///< Tolerate and pass through invalid input
+} SerdCanonFlag;
+
+/// Bitwise OR of SerdCanonFlag values
+typedef uint32_t SerdCanonFlags;
+
+/**
+ Return a new sink that transforms literals to canonical form where possible.
+
+ The returned sink acts like `target` in all respects, except literal nodes
+ in statements may be modified from the original.
+*/
+SERD_API
+SerdSink* SERD_ALLOCATED
+serd_canon_new(const SerdWorld* SERD_NULLABLE world,
+ const SerdSink* SERD_NONNULL target,
+ SerdCanonFlags flags);
+
+/**
+ @}
@defgroup serd_env Environment
@{
*/