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