Except operator cases from delete error rule

This commit is contained in:
Myeongseon Choi 2022-07-20 13:25:04 +09:00
parent 0b331cc916
commit 16d34ad5d2

View file

@ -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(())