diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-12-15 20:27:41 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-12-15 20:27:41 +0100 |
| commit | 2a3d0f4b390457174ed09347dd29e97ff9a783e4 (patch) | |
| tree | 0e0634bff6b7f64131267f4cbe05651c1c91d900 /src/source.rs | |
| parent | 244ad386ec271ff86a2101eb4cc38d37a55552b9 (diff) | |
Set Rules Episode VII: The Set Awakens
Diffstat (limited to 'src/source.rs')
| -rw-r--r-- | src/source.rs | 5 |
1 files changed, 5 insertions, 0 deletions
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<GreenNode> { + &self.root + } + /// The file's abstract syntax tree. pub fn ast(&self) -> TypResult<Markup> { let red = RedNode::from_root(self.root.clone(), self.id); |
