I am starting to debug #2311, which I finally know the root causes of it :
Expansion::map_token_downonly works for
keyword, but parenthesis is not supported. It is due to we only store TokenId for
f<|>oo) will not work either, because in here, the
name_refsyntax node (which is expanded by a macro-call) do not live in the original
position.file_id, which is a case the current
SourceAnalyzerdid not handle.
@Edwin Cheng long term, I believe we should add IDs to all tokens, and not only identifiers.
How about delimiter ?
Delims also should have IDs of some form, but, as they are guaranteed to be paired, the encoding would be somewhat awkward
I think we should assign a single ID to both delims, and store the whole range in the TokenMap