Alright, I'll take the other side of the coin and be the party pooper.
While what nimrod said is true, it is also the biggest reason that you should
not buy the rifle first. Once you buy that new baby, there is no way you will just let it sit there, so you are going to have to feed it and clothe it. Ammo costs $$, range fees cost $$, extra mags cost $$, a loader for the extra mags cost $$, all those nifty accesories like the rails and lights and shellcatchers (I'm not an AR guy, but you're probably getting the idea) cost $$, etc.
On the other hand, the scope just sits in the box (or upgrades a rifle you already have) and waits for you to save up for the new rifle. I know it's boring but it would help get you to your ultimate goal in a more timely fashion.
But Aldon raises some good points about really being sure it's what you want before you buy it and that optics technology is always improving. It would probably be the BEST idea if you were to stick the cash you would spend on either the scope or the rifle somewhere like an interest-bearing account until you can afford to buy the rig and all the gadgets that surely will be soon to follow.
Now with all that being said, I would buy the rifle first too