I am trying to diagram this sentence
Across the rolling sward, toward the tree line where the moonlight could not penetrate, a gaggle of ghouls slinked slowly, a singular purpose driving them on their lumbering, protracted route.
and I do not how to diagram the last bit because I do not know what kind of phrase it is or what function that it specifically serves in the sentence.
Here is what I have so far:
There is nothing connecting this clause to the rest of the sentence. What could it possibly be?
Someone said that the last clause is ungrammatical, and that something like
She ran to the forest, her heart broken.
is not correct, although I have seen this kind of sentence structure many times in literature and do not think it is wrong.
What is this kind of thing and how do I diagram it?