summaryrefslogtreecommitdiff
path: root/src/source.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/source.rs')
-rw-r--r--src/source.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/source.rs b/src/source.rs
index e33e146c..e3803f57 100644
--- a/src/source.rs
+++ b/src/source.rs
@@ -148,10 +148,10 @@ impl SourceFile {
}
pub fn ast(&self) -> TypResult<Markup> {
- let res = RedNode::new_root(self.root.clone(), self.id);
- let errors = res.errors();
+ let red = RedNode::new_root(self.root.clone(), self.id);
+ let errors = red.errors();
if errors.is_empty() {
- Ok(res.ticket().cast().unwrap())
+ Ok(red.as_ref().cast().unwrap())
} else {
Err(Box::new(
errors.into_iter().map(|(span, msg)| Error::new(span, msg)).collect(),