aboutsummaryrefslogtreecommitdiffhomepage
path: root/expand.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-01-22 21:40:08 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-01-22 21:40:08 -0800
commitb43c8da66b3b215690bef5d9814e92bf23b4ba7b (patch)
treeec4ddacaa9ca5105f053cac5907aa669fc3ab24b /expand.cpp
parentda85bdc4012fb5a5e7ffffe61381fb9ba742958b (diff)
More work towards instanced parser. First successful compilation
Diffstat (limited to 'expand.cpp')
-rw-r--r--expand.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/expand.cpp b/expand.cpp
index 561bdfba..ff62d540 100644
--- a/expand.cpp
+++ b/expand.cpp
@@ -1766,8 +1766,9 @@ static void remove_internal_separator2( wcstring &s, int conv )
}
-int expand_string2( parser_t &parser, const wcstring &input, std::vector<wcstring> &output, int flags )
+int expand_string2( const wcstring &input, std::vector<wcstring> &output, int flags )
{
+ parser_t &parser = parser_t::principal_parser();
std::vector<wcstring> list1, list2;
std::vector<wcstring> *in, *out;
@@ -1985,14 +1986,14 @@ int expand_string2( parser_t &parser, const wcstring &input, std::vector<wcstrin
/**
The real expansion function. expand_one is just a wrapper around this one.
*/
-int expand_string( parser_t &parser,
- void *context,
+int expand_string( void *context,
wchar_t *str,
array_list_t *end_out,
int flags )
{
array_list_t list1, list2;
array_list_t *in, *out;
+ parser_t &parser = parser_t::principal_parser();
int i;
int cmdsubst_ok = 1;