Remove statements, replaced by pipelines (#4482)

This commit is contained in:
JT
2022-02-15 14:31:14 -05:00
committed by GitHub
parent 66669d7839
commit 56b3fc61a3
16 changed files with 660 additions and 750 deletions

View File

@ -17,7 +17,7 @@ use nu_command::{create_default_context, BufferedReader};
use nu_engine::{get_full_help, CallExt};
use nu_parser::parse;
use nu_protocol::{
ast::{Call, Expr, Expression, Pipeline, Statement},
ast::{Call, Expr, Expression},
engine::{Command, EngineState, Stack, StateWorkingSet},
Category, Example, IntoPipelineData, PipelineData, RawStream, ShellError, Signature, Span,
Spanned, SyntaxShape, Value, CONFIG_VARIABLE_ID,
@ -241,11 +241,11 @@ fn parse_commandline_args(
);
// We should have a successful parse now
if let Some(Statement::Pipeline(Pipeline { expressions })) = block.stmts.get(0) {
if let Some(pipeline) = block.pipelines.get(0) {
if let Some(Expression {
expr: Expr::Call(call),
..
}) = expressions.get(0)
}) = pipeline.expressions.get(0)
{
let redirect_stdin = call.get_named_arg("stdin");
let login_shell = call.get_named_arg("login");