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.rs45
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 @@
1use ra_syntax::SmolStr;
2
3#[derive(Debug)]
4pub(crate) enum TokenTree {
5 Leaf(Leaf),
6 Subtree(Subtree),
7}
8impl_froms!(TokenTree: Leaf, Subtree);
9
10#[derive(Debug)]
11pub(crate) enum Leaf {
12 Literal(Literal),
13 Punct(Punct),
14 Ident(Ident),
15}
16impl_froms!(Leaf: Literal, Punct, Ident);
17
18#[derive(Debug)]
19pub(crate) struct Subtree {
20 pub(crate) delimiter: Delimiter,
21 pub(crate) token_trees: Vec<TokenTree>,
22}
23
24#[derive(Clone, Copy, Debug)]
25pub(crate) enum Delimiter {
26 Parenthesis,
27 Brace,
28 Bracket,
29 None,
30}
31
32#[derive(Debug)]
33pub(crate) struct Literal {
34 pub(crate) text: SmolStr,
35}
36
37#[derive(Debug)]
38pub(crate) struct Punct {
39 pub(crate) char: char,
40}
41
42#[derive(Debug)]
43pub(crate) struct Ident {
44 pub(crate) text: SmolStr,
45}