diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/n3.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -19,6 +19,7 @@ #include "reader.h" #include "serd_internal.h" #include "stack.h" +#include "statement.h" #include "string_utils.h" #include "uri_utils.h" @@ -1081,6 +1082,7 @@ read_object(SerdReader* reader, ReadContext* ctx, bool emit, bool* ate_dot) static const size_t XSD_BOOLEAN_LEN = 40; const size_t orig_stack_size = reader->stack.size; + SerdCursor orig_cursor = reader->source.cur; SerdStatus ret = SERD_FAILURE; bool simple = (ctx->subject != 0); @@ -1134,6 +1136,7 @@ read_object(SerdReader* reader, ReadContext* ctx, bool emit, bool* ate_dot) break; case '\"': case '\'': + ++orig_cursor.col; ret = read_literal(reader, &o, ate_dot); break; default: @@ -1166,7 +1169,14 @@ read_object(SerdReader* reader, ReadContext* ctx, bool emit, bool* ate_dot) } if (!ret && emit && simple && o) { - ret = emit_statement(reader, *ctx, o); + serd_node_zero_pad(o); + + const SerdStatement statement = { + {ctx->subject, ctx->predicate, o, ctx->graph}, &orig_cursor}; + + ret = serd_sink_write_statement(reader->sink, *ctx->flags, &statement); + + *ctx->flags = 0; } else if (!ret && !emit) { ctx->object = o; return SERD_SUCCESS; |