fix parse_array_of_table_key

allow whitespace before and after [[ and ]] (like, [[ a.b ]])
This commit is contained in:
ToruNiina 2018-12-12 12:14:11 +09:00
parent 5dea88001e
commit bcaf5baf88

View File

@ -1216,6 +1216,7 @@ parse_array_table_key(location<Container>& loc)
"toml::parse_array_table_key: no `[[`", inner_loc,
"should be `[[`"));
}
lex_ws::invoke(inner_loc);
const auto keys = parse_key(inner_loc);
if(!keys)
{
@ -1223,6 +1224,7 @@ parse_array_table_key(location<Container>& loc)
"toml::parse_array_table_key: invalid key", inner_loc,
"not key"));
}
lex_ws::invoke(inner_loc);
const auto close = lex_array_table_close::invoke(inner_loc);
if(!close)
{