aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/inlineasm/AsmScope.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libsolidity/inlineasm/AsmScope.cpp')
-rw-r--r--libsolidity/inlineasm/AsmScope.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/libsolidity/inlineasm/AsmScope.cpp b/libsolidity/inlineasm/AsmScope.cpp
index e3f4615a..7a086846 100644
--- a/libsolidity/inlineasm/AsmScope.cpp
+++ b/libsolidity/inlineasm/AsmScope.cpp
@@ -79,3 +79,11 @@ bool Scope::exists(string const& _name)
else
return false;
}
+
+bool Scope::insideFunction() const
+{
+ for (Scope const* s = this; s; s = s->superScope)
+ if (s->functionScope)
+ return true;
+ return false;
+}