561bb979ce
2169: MBE: Mapping spans for goto definition r=matklad a=edwin0cheng Currently, go to definition gives the wrong span in MBE. This PR implement a mapping mechanism to fix it and it could be used for future MBE hygiene implementation. The basic idea of the mapping is: 1. When expanding the macro, generated 2 `TokenMap` which maps the macro args and macro defs between tokens and input text-ranges. 2. Before converting generated `TokenTree` to `SyntaxNode`, generated a `ExpandedRangeMap` which is a mapping between token and output text-ranges. 3. Using these 3 mappings to construct an `ExpansionInfo` which can map between input text ranges and output text ranges. Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com> |
||
---|---|---|
.. | ||
completion | ||
display | ||
references | ||
snapshots | ||
assists.rs | ||
call_info.rs | ||
change.rs | ||
completion.rs | ||
db.rs | ||
diagnostics.rs | ||
display.rs | ||
extend_selection.rs | ||
feature_flags.rs | ||
folding_ranges.rs | ||
goto_definition.rs | ||
goto_type_definition.rs | ||
hover.rs | ||
impls.rs | ||
inlay_hints.rs | ||
join_lines.rs | ||
lib.rs | ||
line_index_utils.rs | ||
line_index.rs | ||
marks.rs | ||
matching_brace.rs | ||
mock_analysis.rs | ||
parent_module.rs | ||
references.rs | ||
runnables.rs | ||
source_change.rs | ||
status.rs | ||
symbol_index.rs | ||
syntax_highlighting.rs | ||
syntax_tree.rs | ||
test_utils.rs | ||
typing.rs | ||
wasm_shims.rs |