aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/interpreter.h')
-rw-r--r--src/core/interpreter.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/interpreter.h b/src/core/interpreter.h
index 3c6dde6..0feadef 100644
--- a/src/core/interpreter.h
+++ b/src/core/interpreter.h
@@ -514,7 +514,7 @@ public:
int length) const;
/// \brief perform replacement expansion
- /// \param name the name of the varaible that needs to be expanded
+ /// \param name the name of the variable that needs to be expanded
/// \param replacer the function object used to perform expansion
/// \param index array index, use index=0 if it's not an array
/// \return the expanded value
@@ -522,6 +522,13 @@ public:
std::function<void(std::string&)> replacer,
const unsigned index) const;
+ /// \brief perform array replacement expansion
+ /// \param name the name of the array that needs to be expanded
+ /// \param replacer the function object used to perform expansion
+ /// \return the expanded value
+ std::string do_array_replace_expansion(const std::string& name,
+ std::function<void(std::string&)> replacer) const;
+
/// \brief get the length of a string variable
/// \param name the name of the variable
/// \param index the index of the variable