Do a bit more cleanup of block params (#3455)

* Do a bit more cleanup of block params

* Do a bit more cleanup of block params
This commit is contained in:
JT
2021-05-21 19:04:27 +12:00
committed by GitHub
parent 28388b4e3a
commit 751de20f93
15 changed files with 157 additions and 186 deletions

View File

@ -1410,13 +1410,15 @@ fn parse_positional_argument(
let mut commands = hir::Pipeline::new(span);
commands.push(ClassifiedCommand::Expr(Box::new(arg)));
let block = hir::Block::new(
let mut block = hir::Block::new(
Signature::new("<cond>"),
vec![Group::new(vec![commands], lite_cmd.span())],
IndexMap::new(),
span,
);
block.infer_params();
let arg = SpannedExpression::new(Expression::Block(Arc::new(block)), span);
idx = new_idx - 1;