aboutsummaryrefslogtreecommitdiffstats
path: root/src/writer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/writer.c')
-rw-r--r--src/writer.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/writer.c b/src/writer.c
index 71766d9d..afeee33d 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -843,6 +843,8 @@ write_curie(SerdWriter* const writer,
if (is_inline_start(writer, field, flags)) {
TRY(st, esink(" ;", 2, writer));
}
+ case SERD_SYNTAX_EMPTY:
+ break;
}
return st;
}
@@ -946,6 +948,10 @@ serd_writer_write_statement(SerdWriter* writer,
assert(!((flags & SERD_ANON_S) && (flags & SERD_LIST_S)));
assert(!((flags & SERD_ANON_O) && (flags & SERD_LIST_O)));
+ if (writer->syntax == SERD_SYNTAX_EMPTY) {
+ return SERD_SUCCESS;
+ }
+
SerdStatus st = SERD_SUCCESS;
const SerdNode* const subject = serd_statement_subject(statement);
const SerdNode* const predicate = serd_statement_predicate(statement);
@@ -1093,7 +1099,7 @@ serd_writer_write_statement(SerdWriter* writer,
SERD_WARN_UNUSED_RESULT static SerdStatus
serd_writer_end_anon(SerdWriter* writer, const SerdNode* node)
{
- if (writer->syntax == SERD_NTRIPLES || writer->syntax == SERD_NQUADS) {
+ if (writer->syntax != SERD_TURTLE && writer->syntax != SERD_TRIG) {
return SERD_SUCCESS;
}