The former first minister of Scotland has criticised the U.K. prime minister just hours before the triggering of Brexit.