mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-09-18 10:28:09 +08:00
fix parse_array_of_table_key
allow whitespace before and after [[ and ]] (like, [[ a.b ]])
This commit is contained in:
@@ -1216,6 +1216,7 @@ parse_array_table_key(location<Container>& loc)
|
|||||||
"toml::parse_array_table_key: no `[[`", inner_loc,
|
"toml::parse_array_table_key: no `[[`", inner_loc,
|
||||||
"should be `[[`"));
|
"should be `[[`"));
|
||||||
}
|
}
|
||||||
|
lex_ws::invoke(inner_loc);
|
||||||
const auto keys = parse_key(inner_loc);
|
const auto keys = parse_key(inner_loc);
|
||||||
if(!keys)
|
if(!keys)
|
||||||
{
|
{
|
||||||
@@ -1223,6 +1224,7 @@ parse_array_table_key(location<Container>& loc)
|
|||||||
"toml::parse_array_table_key: invalid key", inner_loc,
|
"toml::parse_array_table_key: invalid key", inner_loc,
|
||||||
"not key"));
|
"not key"));
|
||||||
}
|
}
|
||||||
|
lex_ws::invoke(inner_loc);
|
||||||
const auto close = lex_array_table_close::invoke(inner_loc);
|
const auto close = lex_array_table_close::invoke(inner_loc);
|
||||||
if(!close)
|
if(!close)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user