diff --git a/src/compile.rs b/src/compile.rs index 6f210bb..9354653 100644 --- a/src/compile.rs +++ b/src/compile.rs @@ -852,6 +852,9 @@ impl Compiler { self.compile_delete(element)?; } } + ast::ExprKind::BinOp { .. } | ast::ExprKind::UnaryOp { .. } => { + return Err(self.error(CompileErrorType::Delete("expression"))) + } _ => return Err(self.error(CompileErrorType::Delete(expression.node.name()))), } Ok(())