diff options
author | David Robillard <d@drobilla.net> | 2016-08-09 16:54:55 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2016-08-09 16:54:55 -0400 |
commit | b4ba568b24c43c64a758471b36c28923a5adafaa (patch) | |
tree | 9597fc681fe929fc42f7ce3a920e24b50bd9a064 /src/reader.c | |
parent | 25781975fc0783a14f76bc60c15df9d3fcb0f8b0 (diff) | |
download | serd-b4ba568b24c43c64a758471b36c28923a5adafaa.tar.gz serd-b4ba568b24c43c64a758471b36c28923a5adafaa.tar.bz2 serd-b4ba568b24c43c64a758471b36c28923a5adafaa.zip |
Report missing statement separator errors
Diffstat (limited to 'src/reader.c')
-rw-r--r-- | src/reader.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/reader.c b/src/reader.c index 59e0dd2e..0cfa1575 100644 --- a/src/reader.c +++ b/src/reader.c @@ -1245,6 +1245,7 @@ read_predicateObjectList(SerdReader* reader, ReadContext ctx, bool* ate_dot) return true; } + bool ate_semi = false; do { read_ws_star(reader); switch (c = peek_byte(reader)) { @@ -1254,8 +1255,13 @@ read_predicateObjectList(SerdReader* reader, ReadContext ctx, bool* ate_dot) return true; case ';': eat_byte_safe(reader, c); + ate_semi = true; } } while (c == ';'); + + if (!ate_semi) { + return r_err(reader, SERD_ERR_BAD_SYNTAX, "missing ';' or '.'\n"); + } } pop_node(reader, ctx.predicate); |