diff options
Diffstat (limited to 'src/reader.h')
-rw-r--r-- | src/reader.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/reader.h b/src/reader.h index 9b9a217e..559c9cee 100644 --- a/src/reader.h +++ b/src/reader.h @@ -52,6 +52,9 @@ struct SerdReaderImpl { bool seen_genid; }; +SerdStatus +skip_horizontal_whitespace(SerdReader* reader); + SERD_LOG_FUNC(3, 4) SerdStatus r_err(SerdReader* reader, SerdStatus st, const char* fmt, ...); @@ -114,6 +117,18 @@ skip_byte(SerdReader* reader, const int byte) return serd_byte_source_advance(&reader->source); } +static inline int +eat_byte(SerdReader* const reader) +{ + const int c = peek_byte(reader); + + if (c != EOF) { + serd_byte_source_advance(&reader->source); + } + + return c; +} + static inline int SERD_NODISCARD eat_byte_safe(SerdReader* reader, const int byte) { |