Expand description
Module responsible for analyzing the code surrounding the cursor for completion.
Structsยง
- Analysis
Result ๐ - Expansion
Result ๐
Functionsยง
- analyze ๐
- Fill the completion context, this is what does semantic reasoning about the surrounding context of the completion location.
- ancestors_
in_ ๐file_ compensated - classify_
lifetime ๐ - classify_
name ๐ - classify_
name_ ๐ref - expand ๐
- expand_
and_ ๐analyze - expand_
maybe_ ๐stop - Expand attributes and macro calls at the current cursor position for both the original file and fake file repeatedly. As soon as one of the two expansions fail we stop so the original and speculative states stay in sync.
- expected_
type_ ๐and_ name - Calculate the expected type and name of the cursor position.
- fetch_
immediate_ ๐impl_ or_ trait - find_
node_ ๐in_ file - Attempts to find
nodeinsidesyntaxvianodeโs text range. If the fake identifier has been inserted after this node or inside of this node use the_compensatedversion instead. - find_
node_ ๐in_ file_ compensated - Attempts to find
nodeinsidesyntaxvianodeโs text range while compensating for the offset introduced by the fake ident. This is wrong ifnodecomes before the insertion point! Usefind_node_in_fileinstead. - find_
opt_ ๐node_ in_ file - Attempts to find
nodeinsidesyntaxvianodeโs text range. If the fake identifier has been inserted after this node or inside of this node use the_compensatedversion instead. - find_
opt_ ๐node_ in_ file_ compensated - Attempts to find
nodeinsidesyntaxvianodeโs text range while compensating for the offset introduced by the fake ident.. This is wrong ifnodecomes before the insertion point! Usefind_node_in_fileinstead. - has_
in_ ๐newline_ expr_ first - Similar to
has_parens, heuristic sensing incomplete statement before ambiguousExpr - has_
parens ๐ - When writing in the middle of some code the following situation commonly occurs (
|denotes the cursor): - is_
after_ ๐if_ expr - is_
in_ ๐block - is_
in_ ๐breakable - is_
in_ ๐token_ of_ for_ loop - left_
ancestors ๐ - next_
non_ ๐trivia_ sibling - next_
non_ ๐trivia_ token - path_
or_ ๐use_ tree_ qualifier - pattern_
context_ ๐for - prev_
special_ ๐biased_ token_ at_ trivia - token_
at_ ๐offset_ ignore_ whitespace