aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/macros/tt.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-01-31 10:40:05 +0000
committerAleksey Kladov <[email protected]>2019-01-31 20:23:30 +0000
commitce3636798bc9481ec712b84b5cad9973b7844425 (patch)
tree0f252e18492e50ce8eff8c0aacb249a763601dd0 /crates/ra_hir/src/macros/tt.rs
parent9a043a163c59dd2625727f7ff5466d586625a423 (diff)
move macros to a separate crate
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}