aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/reader.c10
-rw-r--r--tests/test-lang.out1
-rw-r--r--tests/test-lang.ttl1
3 files changed, 4 insertions, 8 deletions
diff --git a/src/reader.c b/src/reader.c
index 057775c8..1c7f6f1c 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -99,7 +99,6 @@ error(SerdReader reader, const char* fmt, ...)
fprintf(stderr, "error: %s:%u:%u: ",
reader->cur.filename, reader->cur.line, reader->cur.col);
vfprintf(stderr, fmt, args);
- reader->err = 1;
return 0;
}
@@ -795,10 +794,6 @@ read_qname(SerdReader reader)
TRY_THROW(eat_byte(reader, ':'));
push_byte(reader, prefix, ':');
Ref str = read_name(reader, prefix, false);
- if (reader->err) {
- pop_string(reader, prefix);
- return 0;
- }
return str ? str : prefix;
except:
pop_string(reader, prefix);
@@ -1315,10 +1310,10 @@ read_statement(SerdReader reader)
static bool
read_turtleDoc(SerdReader reader)
{
- while (!reader->err && !reader->eof) {
+ while (!reader->eof) {
TRY_RET(read_statement(reader));
}
- return !reader->err;
+ return true;
}
SERD_API
@@ -1341,7 +1336,6 @@ serd_reader_new(SerdSyntax syntax,
reader->stack = serd_stack_new(STACK_PAGE_SIZE);
reader->cur = cur;
reader->next_id = 1;
- reader->err = 0;
reader->read_buf = (uint8_t*)malloc(READ_BUF_LEN * 2);
reader->read_head = 0;
reader->eof = false;
diff --git a/tests/test-lang.out b/tests/test-lang.out
index 76761505..a75749b0 100644
--- a/tests/test-lang.out
+++ b/tests/test-lang.out
@@ -1,2 +1,3 @@
<http://example.org/test-lang#thing> <http://example.org/test-lang#greeting> "Hello"@en .
+<http://example.org/test-lang#thing> <http://example.org/test-lang#greeting> "Howdy"@en-us .
<http://example.org/test-lang#thing> <http://example.org/test-lang#greeting> "Bonjour"@fr .
diff --git a/tests/test-lang.ttl b/tests/test-lang.ttl
index 407cc6e6..a4a6c77f 100644
--- a/tests/test-lang.ttl
+++ b/tests/test-lang.ttl
@@ -1,4 +1,5 @@
@prefix : <http://example.org/test-lang#> .
:thing :greeting "Hello"@en ;
+ :greeting "Howdy"@en-us ;
:greeting "Bonjour"@fr .