summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hodge <tpg@ucc.asn.au>2019-11-16 17:03:10 +0800
committerJohn Hodge <tpg@ucc.asn.au>2019-11-16 17:03:10 +0800
commitd7c082bbd1a991bc155a1a76fea52fc0dcb3abb3 (patch)
tree05f479b6f341bc712e6d470b084bb39c578a18ff
parentd1df150bbfc8763e95148c5eff7e59a14bb55028 (diff)
downloadmrust-d7c082bbd1a991bc155a1a76fea52fc0dcb3abb3.tar.gz
TOML Parser - Handle newlines before close of an array
-rw-r--r--tools/common/toml.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/common/toml.cpp b/tools/common/toml.cpp
index 4e8e6da6..f6ce7a89 100644
--- a/tools/common/toml.cpp
+++ b/tools/common/toml.cpp
@@ -216,6 +216,10 @@ TomlKeyValue TomlFile::get_next_value()
if(t.m_type != Token::Type::Comma)
break;
}
+ while( t.m_type == Token::Type::Newline )
+ {
+ t = m_lexer.get_token();
+ }
if(t.m_type != Token::Type::SquareClose)
throw ::std::runtime_error(::format(m_lexer, ": Unexpected token after array - ", t));
break;