aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/parsing/Parser.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-05-09 20:55:36 +0800
committerchriseth <chris@ethereum.org>2018-05-09 20:55:36 +0800
commitfe8f38a7a47241f4f910ef229e6655de7648c98b (patch)
treec55b35a320499de1e55fe4a77b8cda025323a3fe /libsolidity/parsing/Parser.cpp
parentbe54f4819713ce5737a271bbdc43ac0a73a8e456 (diff)
downloaddexon-solidity-fe8f38a7a47241f4f910ef229e6655de7648c98b.tar.gz
dexon-solidity-fe8f38a7a47241f4f910ef229e6655de7648c98b.tar.zst
dexon-solidity-fe8f38a7a47241f4f910ef229e6655de7648c98b.zip
Assert integrity of empty IndexAccessPath structure.
Diffstat (limited to 'libsolidity/parsing/Parser.cpp')
-rw-r--r--libsolidity/parsing/Parser.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/libsolidity/parsing/Parser.cpp b/libsolidity/parsing/Parser.cpp
index 38ef32d5..d1be13a5 100644
--- a/libsolidity/parsing/Parser.cpp
+++ b/libsolidity/parsing/Parser.cpp
@@ -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: