Man critically injured in machete attack