I have an answer to my first question:
I had assumed, since “tokenTable” is created and added to the simpleMode object by hand, that it was a convenient storage place for custom Tag objects. However, experimentation has shown that it is not only necessary, but MUST be in place before the simpleMode object is passed into StreamLanguage.define()
, or the highlighting doesn’t work.
I retroactively found this thread, where CodeMirror was patched to add support the optional “tokenTable” for “streamParser” objects. It looks like the “simpleMode” method generates a kind of “streamParser” object, so this all fits.