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
..
2019-10-17 13:08:33 -04:00
2019-11-04 01:14:17 +03:00
2019-11-04 13:29:07 +03:00
2019-11-05 01:16:06 +08:00
2019-10-22 13:01:26 -04:00
2019-11-04 09:06:53 +00:00
2019-10-25 11:49:38 +03:00
2019-11-03 00:19:08 +02:00
2019-10-17 13:08:33 -04:00