TokenUtils
Import :
const TokenUtils = brackets.getModule("utils/TokenUtils")
_
Functions for iterating through tokens in the current editor buffer. Useful for doing light parsing that can rely purely on information gathered by the code coloring mechanism.
Kind: global variable
getTokenAt(cm, pos, precise) ⇒ Object
Like cm.getTokenAt, but with caching. Way more performant for long lines.
Kind: global function
Returns: Object
- Token for position
Param | Type | Description |
---|---|---|
cm | CodeMirror | |
pos | Object | |
precise | boolean | If given, results in more current results. Suppresses caching. |
getInitialContext(cm, pos) ⇒ Object
Creates a context object for the given editor and position, suitable for passing to the move functions.
Kind: global function
Param | Type |
---|---|
cm | CodeMirror |
pos | Object |