diff options
-rw-r--r-- | libbutl/char-scanner.hxx | 8 | ||||
-rw-r--r-- | libbutl/char-scanner.ixx | 6 | ||||
-rw-r--r-- | libbutl/char-scanner.txx | 3 |
3 files changed, 11 insertions, 6 deletions
diff --git a/libbutl/char-scanner.hxx b/libbutl/char-scanner.hxx index b7ea14b..24865b7 100644 --- a/libbutl/char-scanner.hxx +++ b/libbutl/char-scanner.hxx @@ -47,19 +47,21 @@ namespace butl // includes a number of optimizations that assume nobody else is messing // with the stream. // - // The line and position arguments can be used to override the start line - // and position in the stream (useful when re-scanning data saved with the - // save_* facility). + // The line, column, and position arguments can be used to override the + // start line, column, and position in the stream (useful when re-scanning + // data saved with the save_* facility). // char_scanner (std::istream&, bool crlf = true, std::uint64_t line = 1, + std::uint64_t column = 1, std::uint64_t position = 0); char_scanner (std::istream&, validator_type, bool crlf = true, std::uint64_t line = 1, + std::uint64_t column = 1, std::uint64_t position = 0); char_scanner (const char_scanner&) = delete; diff --git a/libbutl/char-scanner.ixx b/libbutl/char-scanner.ixx index 57aefc2..2dc41de 100644 --- a/libbutl/char-scanner.ixx +++ b/libbutl/char-scanner.ixx @@ -5,8 +5,10 @@ namespace butl { template <typename V, std::size_t N> inline char_scanner<V, N>:: - char_scanner (std::istream& is, bool crlf, std::uint64_t l, std::uint64_t p) - : char_scanner (is, validator_type (), crlf, l, p) + char_scanner (std::istream& is, + bool crlf, + std::uint64_t l, std::uint64_t c, std::uint64_t p) + : char_scanner (is, validator_type (), crlf, l, c, p) { } diff --git a/libbutl/char-scanner.txx b/libbutl/char-scanner.txx index 6e0063a..75ea189 100644 --- a/libbutl/char-scanner.txx +++ b/libbutl/char-scanner.txx @@ -11,9 +11,10 @@ namespace butl validator_type v, bool crlf, std::uint64_t l, + std::uint64_t c, std::uint64_t p) : line (l), - column (1), + column (c), position (p), is_ (is), val_ (std::move (v)), |