While reading the 'Guide to the use of the dictionary' of the Compact Oxford English Dictionary (yes, I read dictionary introductions, shame on me), I stumbled upon a section about hyphenation with regards to noun compounds, specifically upon the following sentence:
[...] hyphens are also used to show a word's grammatical function. [...] so that you would write for example I used my credit card but credit-card debt.
What is not clear to me is the sentence 'hyphens are used to show a word's grammatical function'. If I understand the concept of 'grammatical function' correctly, then this sentences doesn't make much sense to me, because then one would have to add hyphens to every grammatical object, because every grammatical object has a function in a sentence.
Am I correct in saying that I can take this sentence to mean something like 'hyphens are also used when the grammatical function of noun compounds is to be an adjective of the following noun'? Or is there maybe some sense of the term 'grammatical function' that I am missing?