Lexical analyzer for scanning and tokenizing input in the JSON5 format.
More...
#include <donut/json.hpp>
template<typename It>
class donut::json::Lexer< It >
Lexical analyzer for scanning and tokenizing input in the JSON5 format.
- Template Parameters
-
It | iterator type of the underlying input source. Must be an input iterator. |
◆ Lexer()
Construct a lexer with a Unicode iterator pair as input.
- Parameters
-
it | iterator to the beginning of the JSON input to scan. |
end | sentinel that marks the end of the JSON input to scan. |
source | initial source location corresponding to the current position of the iterator. |
- Warning
- The iterator pair [it, end) must form a valid forward range.
◆ scan()
Scan and consume the next token from the input.
This advances the internal state of the lexer.
- Returns
- the scanned token.
- Exceptions
-
json::Error | on invalid input. |
std::bad_alloc | on allocation failure. |
any | exception thrown by the underlying input iterator. |
The documentation for this class was generated from the following file: