aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/macros/tt.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/macros/tt.rs')
-rw-r--r--crates/ra_hir/src/macros/tt.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/ra_hir/src/macros/tt.rs b/crates/ra_hir/src/macros/tt.rs
index 11b1089d3..02ff422b5 100644
--- a/crates/ra_hir/src/macros/tt.rs
+++ b/crates/ra_hir/src/macros/tt.rs
@@ -1,11 +1,13 @@
1use ra_syntax::SmolStr; 1use ra_syntax::SmolStr;
2 2
3#[derive(Debug)]
3pub(crate) enum TokenTree { 4pub(crate) enum TokenTree {
4 Leaf(Leaf), 5 Leaf(Leaf),
5 Subtree(Subtree), 6 Subtree(Subtree),
6} 7}
7impl_froms!(TokenTree: Leaf, Subtree); 8impl_froms!(TokenTree: Leaf, Subtree);
8 9
10#[derive(Debug)]
9pub(crate) enum Leaf { 11pub(crate) enum Leaf {
10 Literal(Literal), 12 Literal(Literal),
11 Punct(Punct), 13 Punct(Punct),
@@ -13,11 +15,13 @@ pub(crate) enum Leaf {
13} 15}
14impl_froms!(Leaf: Literal, Punct, Ident); 16impl_froms!(Leaf: Literal, Punct, Ident);
15 17
18#[derive(Debug)]
16pub(crate) struct Subtree { 19pub(crate) struct Subtree {
17 pub(crate) delimiter: Delimiter, 20 pub(crate) delimiter: Delimiter,
18 pub(crate) token_trees: Vec<TokenTree>, 21 pub(crate) token_trees: Vec<TokenTree>,
19} 22}
20 23
24#[derive(Debug)]
21pub(crate) enum Delimiter { 25pub(crate) enum Delimiter {
22 Parenthesis, 26 Parenthesis,
23 Brace, 27 Brace,
@@ -25,14 +29,17 @@ pub(crate) enum Delimiter {
25 None, 29 None,
26} 30}
27 31
32#[derive(Debug)]
28pub(crate) struct Literal { 33pub(crate) struct Literal {
29 pub(crate) text: SmolStr, 34 pub(crate) text: SmolStr,
30} 35}
31 36
37#[derive(Debug)]
32pub(crate) struct Punct { 38pub(crate) struct Punct {
33 pub(crate) char: char, 39 pub(crate) char: char,
34} 40}
35 41
42#[derive(Debug)]
36pub(crate) struct Ident { 43pub(crate) struct Ident {
37 pub(crate) text: SmolStr, 44 pub(crate) text: SmolStr,
38} 45}