aboutsummaryrefslogtreecommitdiff
path: root/crates/libsyntax2/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/libsyntax2/src')
-rw-r--r--crates/libsyntax2/src/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/libsyntax2/src/lib.rs b/crates/libsyntax2/src/lib.rs
index 9b45e2575..ab4a40435 100644
--- a/crates/libsyntax2/src/lib.rs
+++ b/crates/libsyntax2/src/lib.rs
@@ -51,14 +51,14 @@ pub use {
51}; 51};
52 52
53#[derive(Clone, Debug)] 53#[derive(Clone, Debug)]
54pub struct ParsedFile { 54pub struct File {
55 root: SyntaxNode 55 root: SyntaxNode
56} 56}
57 57
58impl ParsedFile { 58impl File {
59 pub fn parse(text: &str) -> Self { 59 pub fn parse(text: &str) -> Self {
60 let root = ::parse(text); 60 let root = ::parse(text);
61 ParsedFile { root } 61 File { root }
62 } 62 }
63 pub fn ast(&self) -> ast::Root { 63 pub fn ast(&self) -> ast::Root {
64 ast::Root::cast(self.syntax()).unwrap() 64 ast::Root::cast(self.syntax()).unwrap()