summaryrefslogtreecommitdiff
path: root/tools/minicargo/toml.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2017-08-24 12:16:09 +0800
committerJohn Hodge <tpg@mutabah.net>2017-08-24 12:16:09 +0800
commit4bdd77ac5497d49b72231fb1168317e1cdf61ed4 (patch)
tree3c723e188c3d0bc945425769ce2356ab64e231f8 /tools/minicargo/toml.cpp
parentff55312ece05353f1a60d4d5ce9c2c691c01e07c (diff)
downloadmrust-4bdd77ac5497d49b72231fb1168317e1cdf61ed4.tar.gz
minicargo toml - Handle empty sections
Diffstat (limited to 'tools/minicargo/toml.cpp')
-rw-r--r--tools/minicargo/toml.cpp8
1 files 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;
}