diff options
author | John Hodge <tpg@ucc.asn.au> | 2019-11-16 17:03:10 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2019-11-16 17:03:10 +0800 |
commit | d7c082bbd1a991bc155a1a76fea52fc0dcb3abb3 (patch) | |
tree | 05f479b6f341bc712e6d470b084bb39c578a18ff /tools | |
parent | d1df150bbfc8763e95148c5eff7e59a14bb55028 (diff) | |
download | mrust-d7c082bbd1a991bc155a1a76fea52fc0dcb3abb3.tar.gz |
TOML Parser - Handle newlines before close of an array
Diffstat (limited to 'tools')
-rw-r--r-- | tools/common/toml.cpp | 4 |
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; |