mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Add token ids for all tt::Leaf
This commit is contained in:
parent
46ca40ccfc
commit
aceb9d7fb0
6 changed files with 72 additions and 33 deletions
|
@ -78,12 +78,12 @@ macro_rules! foobar {
|
|||
|
||||
assert_eq!(expansion.token_trees.len(), 3);
|
||||
// ($e:ident) => { foo bar $e }
|
||||
// 0 1 2 3 4
|
||||
assert_eq!(get_id(&expansion.token_trees[0]), Some(2));
|
||||
assert_eq!(get_id(&expansion.token_trees[1]), Some(3));
|
||||
// 0123 45 6 7 89
|
||||
assert_eq!(get_id(&expansion.token_trees[0]), Some(6));
|
||||
assert_eq!(get_id(&expansion.token_trees[1]), Some(7));
|
||||
|
||||
// So baz should be 5
|
||||
assert_eq!(get_id(&expansion.token_trees[2]), Some(5));
|
||||
// So baz should be 10
|
||||
assert_eq!(get_id(&expansion.token_trees[2]), Some(10));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue