From 4bdd77ac5497d49b72231fb1168317e1cdf61ed4 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Thu, 24 Aug 2017 12:16:09 +0800 Subject: minicargo toml - Handle empty sections --- tools/minicargo/toml.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tools/minicargo/toml.cpp b/tools/minicargo/toml.cpp index 438a1cf9..2b95a5c9 100644 --- a/tools/minicargo/toml.cpp +++ b/tools/minicargo/toml.cpp @@ -123,12 +123,8 @@ TomlKeyValue TomlFile::get_next_value() throw ::std::runtime_error(::format("Unexpected token after block block - ", t)); } DEBUG("Start block " << m_current_block); - // TODO: Are empty sections allowed? - //goto recurse; - - while( t.m_type == Token::Type::Newline ) - t = Token::lex_from(m_if); - break ; + // Recurse! + return get_next_value(); default: break; } -- cgit v1.2.3