aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/interpreter.cpp')
-rw-r--r--src/core/interpreter.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/interpreter.cpp b/src/core/interpreter.cpp
index b048353..405023d 100644
--- a/src/core/interpreter.cpp
+++ b/src/core/interpreter.cpp
@@ -312,6 +312,21 @@ void interpreter::define_function_arguments(scope& current_stack,
current_stack["*"].reset(new variable("*", positional_args));
}
+void interpreter::define_positional_arguments(const std::vector<std::string>::const_iterator begin,
+ const std::vector<std::string>::const_iterator end)
+{
+ std::map<unsigned, std::string> positional_args;
+ std::vector<std::string>::const_iterator iter = begin;
+
+ for(auto i = 1u; iter != end ; ++i, ++iter)
+ positional_args[i] = *iter;
+
+ if(local_members.size() < 1)
+ define("*", positional_args);
+ else
+ define_local("*", positional_args);
+}
+
namespace
{
bool check_function_name(const std::string& name)