The term "sentence and language function" is pretty broad, so I'm going to identify some specific uses of diction (word choice) and syntax (sentence structure) in the song and analyze them for you.
Repetition and Colloquialism
Repetition is the use of a word or phrase again after it has already been used. Colloquialism is a word or saying that is informal or related to a specific cultural usage.
"You done done me and you bet I felt it"
Here, the first "done" is a colloquialism. In some dialects of English, "done" is used to indicate the past tense instead of "have". Therefore, academically, Mraz would say, "You have done me", but here uses done. As a result, he is able to repeat "done", but this time with a different meaning, again a colloquialism. In this usage, it could mean "to have sexual intercourse with" or "to have finished or terminated".
Literal vs. Figurative Meaning
Literal meaning is what would actually happen or appear in a specific situation. Figurative meaning is an implied or more metaphorical understanding.
"I tried to be chill, but you're so hot that I melted."
Here, Mraz transforms mid-sentence from the figurative to the literal interpretations of the words "chill" and "hot". Figuratively, "chill" means relaxed or calm, whereas "hot" means attractive or aggressive. However, literally, something hot would melt something chill.
This means the length of a sentence; longer sentences are more illustrative and drawn out, whereas short sentences are brief and to the point.
"So I won't hesitate / No more, no more. / It cannot wait. / I'm sure."
Mraz uses long sentences in his verses and to introduce his chorus, but the chorus is primarily constructed of short, choppy sentences. The contrast between these two types of syntax really drives home the point that Mraz makes in his chorus.