TextDocument
Parameters
text
the content of the document
cache
precomputed cache for various attributes of the document, or null
if missing
setActive
function to overwrite the active document with this instance for the same source URI