Getting closer to multiline scripts (#2738)

* Begin allowing comments and multiline scripts.

* clippy

* Finish moving to groups. Test pass
This commit is contained in:
Jonathan Turner
2020-11-10 16:52:42 +13:00
committed by GitHub
parent 3924e9d50a
commit e66bf70589
17 changed files with 262 additions and 160 deletions

View File

@@ -51,9 +51,9 @@ impl WholeStreamCommand for SubCommand {
tag,
));
}
match block.block[0].list.get(0) {
Some(item) => match item {
ClassifiedCommand::Expr(expr) => expr.clone(),
match block.block[0].pipelines.get(0) {
Some(item) => match item.list.get(0) {
Some(ClassifiedCommand::Expr(expr)) => expr.clone(),
_ => {
return Err(ShellError::labeled_error(
"Expected a condition",