diff --git a/crates/deno_task_shell/src/parser.rs b/crates/deno_task_shell/src/parser.rs index 18669f6..cff0f5f 100644 --- a/crates/deno_task_shell/src/parser.rs +++ b/crates/deno_task_shell/src/parser.rs @@ -427,7 +427,7 @@ pub enum ArithmeticPart { right: Box, }, #[error("Invalid unary arithmetic expression")] - UnaryAritheticExpr { + UnaryArithmeticExpr { operator: UnaryArithmeticOp, operand: Box, }, @@ -1463,14 +1463,14 @@ fn unary_pre_arithmetic_expr(pair: Pair) -> Result { match first.as_rule() { Rule::pre_arithmetic_op => { let op = parse_pre_arithmetic_op(first)?; - Ok(ArithmeticPart::UnaryAritheticExpr { + Ok(ArithmeticPart::UnaryArithmeticExpr { operator: UnaryArithmeticOp::Pre(op), operand: Box::new(operand), }) } Rule::post_arithmetic_op => { let op = parse_pre_arithmetic_op(first)?; - Ok(ArithmeticPart::UnaryAritheticExpr { + Ok(ArithmeticPart::UnaryArithmeticExpr { operator: UnaryArithmeticOp::Pre(op), operand: Box::new(operand), }) @@ -1505,7 +1505,7 @@ fn unary_post_arithmetic_expr(pair: Pair) -> Result { )), }?; let op = parse_post_arithmetic_op(second)?; - Ok(ArithmeticPart::UnaryAritheticExpr { + Ok(ArithmeticPart::UnaryArithmeticExpr { operator: UnaryArithmeticOp::Post(op), operand: Box::new(operand), }) diff --git a/crates/deno_task_shell/src/shell/execute.rs b/crates/deno_task_shell/src/shell/execute.rs index b2680c7..4c8076f 100644 --- a/crates/deno_task_shell/src/shell/execute.rs +++ b/crates/deno_task_shell/src/shell/execute.rs @@ -618,7 +618,7 @@ async fn evaluate_arithmetic_part( let rhs = Box::pin(evaluate_arithmetic_part(right, state)).await?; apply_conditional_binary_op(lhs, operator, rhs) } - ArithmeticPart::UnaryAritheticExpr { operator, operand } => { + ArithmeticPart::UnaryArithmeticExpr { operator, operand } => { let val = Box::pin(evaluate_arithmetic_part(operand, state)).await?; apply_unary_op(state, *operator, val, operand) }