Assert integrity of empty IndexAccessPath structure.

This commit is contained in:
chriseth
2018-05-09 14:55:36 +02:00
parent be54f48197
commit fe8f38a7a4
2 changed files with 11 additions and 1 deletions
+10
View File
@@ -1098,6 +1098,16 @@ ASTPointer<Statement> Parser::parseSimpleStatement(ASTPointer<ASTString> const&
}
}
bool Parser::IndexAccessedPath::empty() const
{
if (!indices.empty())
{
solAssert(!path.empty(), "");
}
return path.empty() && indices.empty();
}
pair<Parser::LookAheadInfo, Parser::IndexAccessedPath> Parser::tryParseIndexAccessedPath()
{
// These two cases are very hard to distinguish: