From 2e9e8169126fbf9d14bed00bcb3185607f728767 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 30 Dec 2018 13:18:42 +0800 Subject: Common TOML - Allow EOF right after a line --- tools/common/toml.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/common/toml.cpp b/tools/common/toml.cpp index 489f32b6..7e24b610 100644 --- a/tools/common/toml.cpp +++ b/tools/common/toml.cpp @@ -263,8 +263,7 @@ TomlKeyValue TomlFile::get_next_value() } if( m_current_composite.empty() ) { - // TODO: Allow EOF? - if(t.m_type != Token::Type::Newline) + if(t.m_type != Token::Type::Newline && t.m_type != Token::Type::Eof) throw ::std::runtime_error(::format("Unexpected token in TOML file after entry - ", t)); } else -- cgit v1.2.3