diff options
Diffstat (limited to 'libsolidity/inlineasm/AsmScope.cpp')
-rw-r--r-- | libsolidity/inlineasm/AsmScope.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libsolidity/inlineasm/AsmScope.cpp b/libsolidity/inlineasm/AsmScope.cpp index 1db5ca41..315d5953 100644 --- a/libsolidity/inlineasm/AsmScope.cpp +++ b/libsolidity/inlineasm/AsmScope.cpp @@ -80,6 +80,15 @@ bool Scope::exists(string const& _name) return false; } +size_t Scope::numberOfVariables() const +{ + size_t count = 0; + for (auto const& identifier: identifiers) + if (identifier.second.type() == typeid(Scope::Variable)) + count++; + return count; +} + bool Scope::insideFunction() const { for (Scope const* s = this; s; s = s->superScope) |