From 09bf03fd6e522d6e421fed85d010057f87486544 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 31 Mar 2023 14:20:03 -0400 Subject: Add empty syntax type for suppressing output --- include/serd/syntax.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'include') 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); -- cgit v1.2.1