aboutsummaryrefslogtreecommitdiff
path: root/crates/libsyntax2
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-08-25 09:44:58 +0100
committerAleksey Kladov <[email protected]>2018-08-25 09:44:58 +0100
commit220d285b4afb250e59a08e9b1ad38c2fc2275782 (patch)
treeab32fc8d58ee04fc5afae20bc80f02c6b2557a39 /crates/libsyntax2
parentcf278ed3bf71d336422f7d7d7d51be92b717b720 (diff)
rename ParsedFile -> File
Diffstat (limited to 'crates/libsyntax2')
-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()