mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
rename ParsedFile -> File
This commit is contained in:
parent
cf278ed3bf
commit
220d285b4a
11 changed files with 39 additions and 39 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue