According to my Cambridge Grammar of English, ‘such (a)’ is used in noun phrases with attributive adjectives.
She’s such a quiet girl. (such a + adjective + singular countable noun)
They’re such nice kids. (such + adjective + plural countable noun)
She always uses such fresh food. (such + adjective + uncountable noun)
And indeed, those are the rules as explained in the manual I use: such (a) + adj. + noun. But then, out of nowhere there’s this exercise that requires the answer:
It was such fun for all of us to be together.
There is no adjective, and unfortunately no explanations either. So why is that structure acceptable? Or is it just a ‘freak exception’?
This usage of such as an intensifier is both an adjective and adverb:
adj. 2b. Of so extreme a degree or quality: never dreamed of such wealth.
adv. 1. To so extreme a degree, so: such beautiful flowers; such a funny character.
As such, it can modify either a noun (“such fun”) or an adjective (“such nice kids”).