rust-analyzer/crates
bors[bot] 561bb979ce
Merge #2169
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>
2019-11-09 09:13:14 +00:00
..
ra_arena cleanup 2019-08-06 10:57:16 +02:00
ra_assists Appease the linter by dummy doc comments 2019-11-04 22:33:21 +03:00
ra_batch Update crates 2019-11-07 13:05:12 -05:00
ra_cfg use slightly more idiomatic api for cfg 2019-10-08 14:22:49 +03:00
ra_cli Bump psm, console, indicatif 2019-11-05 10:38:50 -05:00
ra_db Reexport relative_path from ra_db 2019-11-04 01:14:17 +03:00
ra_fmt fix hir for new block syntax 2019-09-02 21:23:19 +03:00
ra_hir Merge #2179 2019-11-06 21:11:42 +00:00
ra_hir_def Touch up nameres doc comment 2019-11-09 00:23:19 +03:00
ra_hir_expand Remove map_ranges in RevTokenMap 2019-11-09 12:00:46 +08:00
ra_ide_api Merge #2169 2019-11-09 09:13:14 +00:00
ra_lsp_server Update crates 2019-11-07 13:05:12 -05:00
ra_mbe Remove map_ranges in RevTokenMap 2019-11-09 12:00:46 +08:00
ra_parser cargo xtask format with 1.39 2019-11-07 09:44:45 -05:00
ra_prof show unaccounted for time in profiling 2019-10-24 09:14:33 +03:00
ra_project_model Bump crates 2019-10-22 13:01:26 -04:00
ra_syntax Merge #2149 2019-11-04 09:06:53 +00:00
ra_text_edit introduce SingleFileChange 2019-10-25 11:49:38 +03:00
ra_tt Use macro_rules shift to map text ranges 2019-11-05 02:09:16 +08:00
ra_vfs_glob relative-path 1.0 2019-10-17 13:08:33 -04:00
test_utils support range selection in assist docs 2019-10-26 20:57:23 +03:00