aboutsummaryrefslogtreecommitdiffstats
path: root/src/reader.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/reader.c')
-rw-r--r--src/reader.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/reader.c b/src/reader.c
index f34f7974..7e0864cc 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -162,9 +162,10 @@ tokcmp(const SerdNode* const node, const char* const tok, const size_t n)
}
SerdStatus
-emit_statement(SerdReader* const reader,
- const ReadContext ctx,
- SerdNode* const o)
+emit_statement_at(SerdReader* const reader,
+ const ReadContext ctx,
+ SerdNode* const o,
+ SerdCaret* const caret)
{
if (reader->stack.size + (2 * sizeof(SerdNode)) > reader->stack.buf_size) {
return SERD_BAD_STACK;
@@ -175,7 +176,7 @@ emit_statement(SerdReader* const reader,
serd_node_zero_pad(o);
const SerdStatement statement = {{ctx.subject, ctx.predicate, o, ctx.graph},
- &reader->source->caret};
+ caret};
const SerdStatus st =
serd_sink_write_statement(reader->sink, *ctx.flags, &statement);
@@ -185,6 +186,14 @@ emit_statement(SerdReader* const reader,
}
SerdStatus
+emit_statement(SerdReader* const reader,
+ const ReadContext ctx,
+ SerdNode* const o)
+{
+ return emit_statement_at(reader, ctx, o, &reader->source->caret);
+}
+
+SerdStatus
serd_reader_read_document(SerdReader* const reader)
{
assert(reader);