My codemirror mode object implements token(stream, state)
and blankLine(state)
methods.
How do I determine the line number of the stream
object that is passed in to token
method, and the line number that was skipped when my blankLine
was called?
You can't, and you shouldn't. Modes must approach the document as a stream, and only know about what came before (the state) and the current line (the stream). This is necessary to allow the editor to use highlighting info and states even if lines were added or removed above a given position in the document.