mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-12-16 03:08:52 +08:00
feat: use detail::none_t instead of char
Although the error value from combinators currently does not have any information, it can have an information because it is a char value. It is better to use no-information-type explicitly to make it clear that it does not have any information. So I added none_t in toml::detai and use it in combinators and parsers as an error value from combinators.
This commit is contained in:
@@ -376,7 +376,7 @@ parse_ml_basic_string(location<Container>& loc)
|
||||
// immediate newline is ignored (if exists)
|
||||
/* discard return value */ lex_newline::invoke(inner_loc);
|
||||
|
||||
delim = err('\0');
|
||||
delim = none();
|
||||
while(!delim)
|
||||
{
|
||||
using lex_unescaped_seq = repeat<
|
||||
@@ -432,7 +432,7 @@ parse_basic_string(location<Container>& loc)
|
||||
std::string retval;
|
||||
retval.reserve(token.unwrap().size());
|
||||
|
||||
quot = err('\0');
|
||||
quot = none();
|
||||
while(!quot)
|
||||
{
|
||||
using lex_unescaped_seq = repeat<lex_basic_unescaped, unlimited>;
|
||||
|
||||
Reference in New Issue
Block a user