aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/interpreter.h')
-rw-r--r--src/core/interpreter.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/interpreter.h b/src/core/interpreter.h
index 3f77f5d..2f6854b 100644
--- a/src/core/interpreter.h
+++ b/src/core/interpreter.h
@@ -176,6 +176,14 @@ public:
return members.end();
}
+ ///
+ /// \brief checks whether the current scope is local or global
+ /// \return whether current scope is local
+ bool is_local_scope() const
+ {
+ return local_members.size() > 0;
+ }
+
/// \brief set current output stream
/// \param stream the pointer to the output stream
void set_output_stream(std::ostream* stream)