mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-17 16:11:15 -03:00
Default parser_t::eval()'s block type to top
This is the parameter value at every call site except one. Just make it the default.
This commit is contained in:
13
src/parser.h
13
src/parser.h
@@ -259,20 +259,23 @@ class parser_t : public std::enable_shared_from_this<parser_t> {
|
||||
///
|
||||
/// \param cmd the string to evaluate
|
||||
/// \param io io redirections to perform on all started jobs
|
||||
/// \param block_type The type of block to push on the block stack
|
||||
/// \param block_type The type of block to push on the block stack, which must be either 'top'
|
||||
/// or 'subst'.
|
||||
///
|
||||
/// \return the eval result,
|
||||
eval_result_t eval(const wcstring &cmd, const io_chain_t &io, enum block_type_t block_type);
|
||||
eval_result_t eval(const wcstring &cmd, const io_chain_t &io,
|
||||
block_type_t block_type = block_type_t::top);
|
||||
|
||||
/// Evaluate the parsed source ps.
|
||||
/// Because the source has been parsed, a syntax error is impossible.
|
||||
eval_result_t eval(parsed_source_ref_t ps, const io_chain_t &io, enum block_type_t block_type);
|
||||
eval_result_t eval(parsed_source_ref_t ps, const io_chain_t &io,
|
||||
block_type_t block_type = block_type_t::top);
|
||||
|
||||
/// Evaluates a node.
|
||||
/// The node type must be grammar::statement or grammar::job_list.
|
||||
template <typename T>
|
||||
eval_result_t eval_node(parsed_source_ref_t ps, tnode_t<T> node, block_type_t block_type,
|
||||
job_lineage_t lineage);
|
||||
eval_result_t eval_node(parsed_source_ref_t ps, tnode_t<T> node, job_lineage_t lineage,
|
||||
block_type_t block_type = block_type_t::top);
|
||||
|
||||
/// Evaluate line as a list of parameters, i.e. tokenize it and perform parameter expansion and
|
||||
/// cmdsubst execution on the tokens. Errors are ignored. If a parser is provided, it is used
|
||||
|
||||
Reference in New Issue
Block a user