diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-09-20 19:49:47 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-09-20 19:49:47 +0200 |
| commit | 3760748fddd3b793c79c370398a9d4a3fc5afc04 (patch) | |
| tree | b1a615e510aa231cfe9757a9c0a35a375e32e3ba /src/syntax | |
| parent | 757a701c1aa2a6fb80033c7e75666661818da6f9 (diff) | |
Refactor error handling
Diffstat (limited to 'src/syntax')
| -rw-r--r-- | src/syntax/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/syntax/mod.rs b/src/syntax/mod.rs index c2b06efe..89937f2c 100644 --- a/src/syntax/mod.rs +++ b/src/syntax/mod.rs @@ -13,7 +13,7 @@ pub use highlight::*; pub use span::*; use self::ast::{MathNode, RawNode, TypedNode, Unit}; -use crate::diag::Error; +use crate::diag::SourceError; use crate::source::SourceId; use crate::util::EcoString; @@ -67,14 +67,14 @@ impl SyntaxNode { } /// The error messages for this node and its descendants. - pub fn errors(&self) -> Vec<Error> { + pub fn errors(&self) -> Vec<SourceError> { if !self.erroneous() { return vec![]; } match self.kind() { &NodeKind::Error(pos, ref message) => { - vec![Error::new(self.span().with_pos(pos), message)] + vec![SourceError::new(self.span().with_pos(pos), message)] } _ => self .children() |
