Token-related utilities
wrap generate_tokens to catch EOF errors
Return the line in a cell at a given cursor position
Used for calling line-based APIs that don’t support multi-line input, yet.
Parameters: | cell: text
cursor_pos: integer
|
---|---|
Returns: | (line, offset): (text, integer)
|
Get the token at a given cursor
Used for introspection.
Function calls are prioritized, so the token for the callable will be returned if the cursor is anywhere inside the call.
Parameters: | cell : unicode
cursor_pos : int
|
---|