c52d58f346
Properly calculate best failure in macro matching Previously, we used spans. This was not good. Sometimes, the span of the token that failed to match may come from a position later in the file which has been transcribed into a token stream way earlier in the file. If precisely this token fails to match, we think that it was the best match because its span is so high, even though other arms might have gotten further in the token stream. We now try to properly use the location in the token stream. This needs a little cleanup as the `best_failure` field is getting out of hand but it should be mostly good to go. I hope I didn't violate too many abstraction boundaries.. |
||
---|---|---|
.. | ||
mbe | ||
mut_visit | ||
parse | ||
tokenstream | ||
base.rs | ||
build.rs | ||
config.rs | ||
errors.rs | ||
expand.rs | ||
lib.rs | ||
mbe.rs | ||
module.rs | ||
placeholders.rs | ||
proc_macro_server.rs | ||
proc_macro.rs | ||
tests.rs |