Why does the following code cause an error?

var foo = function(){ /* code */ }

// ...doesn't it stand to reason that the function expression itself can be invoked, just by putting () after it?

function(){ /* code */ }(); // SyntaxError: Unexpected token (