From 2a3d0f4b390457174ed09347dd29e97ff9a783e4 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Wed, 15 Dec 2021 20:27:41 +0100 Subject: Set Rules Episode VII: The Set Awakens --- src/source.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/source.rs') diff --git a/src/source.rs b/src/source.rs index 509b0a76..5fd85ed9 100644 --- a/src/source.rs +++ b/src/source.rs @@ -149,6 +149,11 @@ impl SourceFile { Self::new(SourceId(0), Path::new(""), src.into()) } + /// The root node of the untyped green tree. + pub fn root(&self) -> &Rc { + &self.root + } + /// The file's abstract syntax tree. pub fn ast(&self) -> TypResult { let red = RedNode::from_root(self.root.clone(), self.id); -- cgit v1.2.3