From a9c387377b796ecfca6d3f222d03e8e2f838f274 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 13 Mar 2012 10:34:16 -0500 Subject: Made join_args() a global function --- src/scope.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/scope.h') diff --git a/src/scope.h b/src/scope.h index ccfc750b..134babb2 100644 --- a/src/scope.h +++ b/src/scope.h @@ -658,6 +658,21 @@ call_scope_t::get(std::size_t index, bool) { return args[index].as_any(); } +inline string join_args(call_scope_t& args) { + std::ostringstream buf; + bool first = true; + + for (std::size_t i = 0; i < args.size(); i++) { + if (first) + first = false; + else + buf << ' '; + buf << args[i]; + } + + return buf.str(); +} + class value_scope_t : public child_scope_t { value_t value; -- cgit v1.2.3