rust/crates
bors[bot] d9fb01f803
Merge #2173
2173: MBE: Add TokenId shift in macro_rules r=matklad a=edwin0cheng

As discussed in #2169 , for fixing duplication TokenId during expansion :

> What we can do here is to re-number the tokens during expansion. Specifically:
> * when we create macro_rules, we note the highest id of the token we have as shift>
> * when we expand macro rules, if we need to output a token from definition, we just re-use its id
> * if we need to output a token from the argument, we increase its id by shift (so it's guaranteed to not to collide with anything from the definition)
> * finally, when we have a HirFileId of the expansion, we can look up the original value of shift and classify node to the arg/def by comparing it's id with shift.
> 

This PR implement first 3 points of above solution. 

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
2019-11-04 17:21:41 +00:00
..
ra_arena cleanup 2019-08-06 10:57:16 +02:00
ra_assists Extract common parts of match arms in convert_to_guarded_return assist. 2019-11-01 18:34:42 +01:00
ra_batch relative-path 1.0 2019-10-17 13:08:33 -04:00
ra_cfg use slightly more idiomatic api for cfg 2019-10-08 14:22:49 +03:00
ra_cli add --with-deps option to analysis-stats 2019-10-24 12:32:19 +03: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 Cleanup unused marks 2019-11-04 13:29:07 +03:00
ra_hir_def Reexport relative_path from ra_db 2019-11-04 01:14:17 +03:00
ra_hir_expand Move diagnostics to hir_expand 2019-11-02 23:42:38 +03:00
ra_ide_api Reexport relative_path from ra_db 2019-11-04 01:14:17 +03:00
ra_lsp_server Use bool instead of Option<bool> and print it's value only when true 2019-11-02 19:33:34 -03:00
ra_mbe Change to add 1 if non zero shift 2019-11-05 01:16:06 +08:00
ra_parser fix parsing of for loops inside expressions 2019-10-28 15:41:34 +03: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 Silence some warnings 2019-11-03 00:19:08 +02: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