I'm struggling with figuring the function of the particle と in this sentence from a book of Japanese literature in parallel text from the beginning of 夏目漱石's 夢十夜:
腕組をして枕元に坐っていると、仰向に寝た女が、静かな声でもう死にますと云う。
The parallel text to this sentence translates this to:
I was sitting with my arms crossed by the bedside of a woman. She was lying on her back.
. . .
I do understand how the sentence was thus translated; however, I don't understand the function of the particle と in the sentence.
Can someone elaborate on the use of と in this sentence?