diff --git a/toml/parser.hpp b/toml/parser.hpp index dc749136..f345d3b0 100644 --- a/toml/parser.hpp +++ b/toml/parser.hpp @@ -1406,10 +1406,16 @@ parse_inline_table(location& loc) return ok(std::make_pair( retval, region(loc, first, loc.iter()))); } + else if(*loc.iter() == '#' || *loc.iter() == '\r' || *loc.iter() == '\n') + { + throw syntax_error(format_underline("[error] " + "toml::parse_inline_table: missing curly brace `}`", + {{std::addressof(loc), "should be `}`"}})); + } else { throw syntax_error(format_underline("[error] " - "toml:::parse_inline_table: missing table separator `,` ", + "toml::parse_inline_table: missing table separator `,` ", {{std::addressof(loc), "should be `,`"}})); } }