rename ParsedFile -> File

This commit is contained in:
Aleksey Kladov 2018-08-25 11:44:58 +03:00
parent cf278ed3bf
commit 220d285b4a
11 changed files with 39 additions and 39 deletions

View file

@ -51,14 +51,14 @@ pub use {
};
#[derive(Clone, Debug)]
pub struct ParsedFile {
pub struct File {
root: SyntaxNode
}
impl ParsedFile {
impl File {
pub fn parse(text: &str) -> Self {
let root = ::parse(text);
ParsedFile { root }
File { root }
}
pub fn ast(&self) -> ast::Root {
ast::Root::cast(self.syntax()).unwrap()