aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_tt
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-02-12 17:57:39 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-02-12 17:57:39 +0000
commit24287d024dd72d0f8325c9de7b7e90db58a634dc (patch)
tree19b38d8e1221e2fb0aa31126208555154f6a2991 /crates/ra_tt
parent3e367b5760117856bd178d637f740a7f0cd1ffee (diff)
parent5f89180fd9b1b0e8a0fd7d8988485c4ba598d70e (diff)
Merge #810
810: make token trees eq r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_tt')
-rw-r--r--crates/ra_tt/src/lib.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_tt/src/lib.rs b/crates/ra_tt/src/lib.rs
index c1f37b889..0b0b9b4d2 100644
--- a/crates/ra_tt/src/lib.rs
+++ b/crates/ra_tt/src/lib.rs
@@ -33,14 +33,14 @@ impl TokenId {
33 } 33 }
34} 34}
35 35
36#[derive(Debug, Clone)] 36#[derive(Debug, Clone, PartialEq, Eq)]
37pub enum TokenTree { 37pub enum TokenTree {
38 Leaf(Leaf), 38 Leaf(Leaf),
39 Subtree(Subtree), 39 Subtree(Subtree),
40} 40}
41impl_froms!(TokenTree: Leaf, Subtree); 41impl_froms!(TokenTree: Leaf, Subtree);
42 42
43#[derive(Debug, Clone)] 43#[derive(Debug, Clone, PartialEq, Eq)]
44pub enum Leaf { 44pub enum Leaf {
45 Literal(Literal), 45 Literal(Literal),
46 Punct(Punct), 46 Punct(Punct),
@@ -48,7 +48,7 @@ pub enum Leaf {
48} 48}
49impl_froms!(Leaf: Literal, Punct, Ident); 49impl_froms!(Leaf: Literal, Punct, Ident);
50 50
51#[derive(Debug, Clone)] 51#[derive(Debug, Clone, PartialEq, Eq)]
52pub struct Subtree { 52pub struct Subtree {
53 pub delimiter: Delimiter, 53 pub delimiter: Delimiter,
54 pub token_trees: Vec<TokenTree>, 54 pub token_trees: Vec<TokenTree>,
@@ -62,7 +62,7 @@ pub enum Delimiter {
62 None, 62 None,
63} 63}
64 64
65#[derive(Debug, Clone)] 65#[derive(Debug, Clone, PartialEq, Eq)]
66pub struct Literal { 66pub struct Literal {
67 pub text: SmolStr, 67 pub text: SmolStr,
68} 68}
@@ -79,7 +79,7 @@ pub enum Spacing {
79 Joint, 79 Joint,
80} 80}
81 81
82#[derive(Debug, Clone)] 82#[derive(Debug, Clone, PartialEq, Eq)]
83pub struct Ident { 83pub struct Ident {
84 pub text: SmolStr, 84 pub text: SmolStr,
85 pub id: TokenId, 85 pub id: TokenId,