diff options
author | Aleksey Kladov <[email protected]> | 2018-07-31 13:40:40 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-07-31 13:40:40 +0100 |
commit | 9ce7e8110254e8db476c96bce2eecb2d16983159 (patch) | |
tree | abaddbafc4593948849394b430e3bde5c624fa22 /src/ast.rs | |
parent | 2a2815266b35de12bd3c48cc405e8b3e8fcf8885 (diff) |
cleanups
Diffstat (limited to 'src/ast.rs')
-rw-r--r-- | src/ast.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ast.rs b/src/ast.rs index b513eb13e..48e1d23ac 100644 --- a/src/ast.rs +++ b/src/ast.rs | |||
@@ -1,14 +1,16 @@ | |||
1 | use std::sync::Arc; | 1 | use std::sync::Arc; |
2 | use {SyntaxNode, TreeRoot, SyntaxRoot}; | 2 | use {SyntaxNode, SyntaxRoot, TreeRoot}; |
3 | 3 | ||
4 | #[derive(Debug)] | 4 | #[derive(Debug)] |
5 | pub struct File<R: TreeRoot = Arc<SyntaxRoot>> { | 5 | pub struct File<R: TreeRoot = Arc<SyntaxRoot>> { |
6 | syntax: SyntaxNode<R> | 6 | syntax: SyntaxNode<R>, |
7 | } | 7 | } |
8 | 8 | ||
9 | impl File<Arc<SyntaxRoot>> { | 9 | impl File<Arc<SyntaxRoot>> { |
10 | pub fn parse(text: &str) -> Self { | 10 | pub fn parse(text: &str) -> Self { |
11 | File { syntax: ::parse(text.to_owned()) } | 11 | File { |
12 | syntax: ::parse(text.to_owned()), | ||
13 | } | ||
12 | } | 14 | } |
13 | } | 15 | } |
14 | 16 | ||