aboutsummaryrefslogtreecommitdiffhomepage
path: root/parser.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-12-20 14:37:40 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-12-20 14:37:40 -0800
commit739e529416c3917d1e75d1a41850762a327e6ea9 (patch)
tree6d6bcf6fd73e1990e0ccdf8875c94c9fb34b05b9 /parser.h
parent384987cd5b9bcc2fd194c8343e00c1931c174a73 (diff)
Initial flailing around trying to adopt new parser for actual execution
Diffstat (limited to 'parser.h')
-rw-r--r--parser.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/parser.h b/parser.h
index cbd59bf5..878b2b57 100644
--- a/parser.h
+++ b/parser.h
@@ -295,6 +295,12 @@ struct profile_item_t
struct tokenizer_t;
+struct parser_context_t
+{
+ parse_node_tree_t tree;
+ wcstring src;
+};
+
class parser_t
{
private:
@@ -341,11 +347,15 @@ private:
/* No copying allowed */
parser_t(const parser_t&);
parser_t& operator=(const parser_t&);
+
+ process_t *create_job_process(job_t *job, const parse_node_t &statement_node, const parser_context_t &ctx);
+ process_t *create_boolean_process(job_t *job, const parse_node_t &bool_statement, const parser_context_t &ctx);
void parse_job_argument_list(process_t *p, job_t *j, tokenizer_t *tok, std::vector<completion_t>&, bool);
int parse_job(process_t *p, job_t *j, tokenizer_t *tok);
void skipped_exec(job_t * j);
void eval_job(tokenizer_t *tok);
+ void eval_job(const parse_node_t &job_node, const parser_context_t &ctx);
int parser_test_argument(const wchar_t *arg, wcstring *out, const wchar_t *prefix, int offset);
void print_errors(wcstring &target, const wchar_t *prefix);
void print_errors_stderr();
@@ -394,6 +404,7 @@ public:
\return 0 on success, 1 otherwise
*/
int eval(const wcstring &cmdStr, const io_chain_t &io, enum block_type_t block_type);
+ int eval2(const wcstring &cmd_str, const io_chain_t &io, enum block_type_t block_type);
/**
Evaluate line as a list of parameters, i.e. tokenize it and perform parameter expansion and cmdsubst execution on the tokens.