aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-03-31 14:20:03 -0400
committerDavid Robillard <d@drobilla.net>2023-12-02 18:49:07 -0500
commit09bf03fd6e522d6e421fed85d010057f87486544 (patch)
tree837adc1381f0e19e7cbab246be81de5fb6f1bf50 /include
parent2f490c80f9623ac2deaeb37a29fc98d01eb20e7e (diff)
downloadserd-09bf03fd6e522d6e421fed85d010057f87486544.tar.gz
serd-09bf03fd6e522d6e421fed85d010057f87486544.tar.bz2
serd-09bf03fd6e522d6e421fed85d010057f87486544.zip
Add empty syntax type for suppressing output
Diffstat (limited to 'include')
-rw-r--r--include/serd/syntax.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/include/serd/syntax.h b/include/serd/syntax.h
index c3a33ff5..62ba6571 100644
--- a/include/serd/syntax.h
+++ b/include/serd/syntax.h
@@ -18,17 +18,20 @@ SERD_BEGIN_DECLS
/// Syntax supported by serd
typedef enum {
- SERD_TURTLE = 1U, ///< Terse triples http://www.w3.org/TR/turtle
- SERD_NTRIPLES = 2U, ///< Line-based triples http://www.w3.org/TR/n-triples/
- SERD_NQUADS = 3U, ///< Line-based quads http://www.w3.org/TR/n-quads/
- SERD_TRIG = 4U, ///< Terse quads http://www.w3.org/TR/trig/
+ SERD_SYNTAX_EMPTY = 0U, ///< Empty syntax
+ SERD_TURTLE = 1U, ///< Terse triples http://www.w3.org/TR/turtle/
+ SERD_NTRIPLES = 2U, ///< Flat triples http://www.w3.org/TR/n-triples/
+ SERD_NQUADS = 3U, ///< Flat quads http://www.w3.org/TR/n-quads/
+ SERD_TRIG = 4U, ///< Terse quads http://www.w3.org/TR/trig/
} SerdSyntax;
/**
Get a syntax by name.
- Case-insensitive, supports "Turtle", "NTriples", "NQuads", and "TriG". Zero
- is returned if the name is not recognized.
+ Case-insensitive, supports "Turtle", "NTriples", "NQuads", and "TriG".
+
+ @return The syntax with the given name, or the empty syntax if the name is
+ unknown.
*/
SERD_PURE_API SerdSyntax
serd_syntax_by_name(const char* SERD_NONNULL name);