use std::sync::Arc; use {SyntaxNode, TreeRoot, SyntaxRoot}; #[derive(Debug)] pub struct File> { syntax: SyntaxNode } impl File> { pub fn parse(text: &str) -> Self { File { syntax: ::parse(text.to_owned()) } } } impl File { pub fn syntax(&self) -> SyntaxNode { self.syntax.clone() } }