aboutsummaryrefslogtreecommitdiff
path: root/src/ast.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast.rs')
-rw-r--r--src/ast.rs8
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 @@
1use std::sync::Arc; 1use std::sync::Arc;
2use {SyntaxNode, TreeRoot, SyntaxRoot}; 2use {SyntaxNode, SyntaxRoot, TreeRoot};
3 3
4#[derive(Debug)] 4#[derive(Debug)]
5pub struct File<R: TreeRoot = Arc<SyntaxRoot>> { 5pub struct File<R: TreeRoot = Arc<SyntaxRoot>> {
6 syntax: SyntaxNode<R> 6 syntax: SyntaxNode<R>,
7} 7}
8 8
9impl File<Arc<SyntaxRoot>> { 9impl 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