nl_tokens: Fetch the parser token for a given character . Useful for hacks that want to inspect the mode state ( say for completion ) .
pl_tokens: function ( pos ) { var doc = this . view . doc ; pos = clipPos ( doc , pos ) ; var state = getStateBefore ( this , pos . line ) , mode = this . view . mode ; var line = getLine ( doc , pos . line ) ; var stream = new StringStream ( line . text , this . options . tabSize ) ; while ( stream . pos < pos . ch && ! stream . eol ( ) ) { stream . start = stream . pos ; var style = mode . token ( stream , state ) ; } return { start : stream . start , end : stream . pos , string : stream . current ( ) , className : style || null , // Deprecated, use 'type' instead <mask> : style || null , state : state } ; }