Skip to main content

Module token

Module token 

Source

Modules§

semantic_token

Structs§

CstTokens
Component that contains CST leaf tokens from the rowan syntax tree.
TokenComponent
Component used to indicate the currently targeted token during a request.

Functions§

get_current_cst_token
Resolve the token at the request’s cursor (see token_at_cursor) into a TokenComponent. In whitespace, the token is empty and sits at the cursor, so completion text is inserted there and filters accept anything.
token_at_cursor
The token a cursor at byte offset belongs to, given the tokens’ spans.