Allow the caller to specify the goal node when parsing a string via the

new parser. This enables parsing either a job list or an argument list.
This commit is contained in:
ridiculousfish
2014-03-02 16:03:05 -08:00
parent 1486774249
commit 8d6b0c8d76
2 changed files with 18 additions and 18 deletions

View File

@@ -200,8 +200,8 @@ class parse_node_tree_t : public std::vector<parse_node_t>
parse_node_list_t specific_statements_for_job(const parse_node_t &job) const;
};
/* The big entry point. Parse a string! */
bool parse_tree_from_string(const wcstring &str, parse_tree_flags_t flags, parse_node_tree_t *output, parse_error_list_t *errors);
/* The big entry point. Parse a string, attempting to produce a tree for the given goal type */
bool parse_tree_from_string(const wcstring &str, parse_tree_flags_t flags, parse_node_tree_t *output, parse_error_list_t *errors, parse_token_type_t goal = symbol_job_list);
/* Fish grammar: