|
libdonut 2.3.6
Application framework for cross-platform game development in C++20
|
Lexical analyzer for scanning and tokenizing input in the JSON5 format. More...
#include <donut/json.hpp>
Public Member Functions | |
| Lexer (unicode::UTF8Iterator< It > it, unicode::UTF8Sentinel end, const SourceLocation &source) | |
| Construct a lexer with a Unicode iterator pair as input. | |
| Token | scan () |
| Scan and consume the next token from the input. | |
Lexical analyzer for scanning and tokenizing input in the JSON5 format.
| It | iterator type of the underlying input source. Must be an input iterator. |
|
inline |
Construct a lexer with a Unicode iterator pair as input.
| 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. |
|
inline |
Scan and consume the next token from the input.
This advances the internal state of the lexer.
| json::Error | on invalid input. |
| std::bad_alloc | on allocation failure. |
| any | exception thrown by the underlying input iterator. |