mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 22:09:09 +00:00
fixed scope lookup bug
This commit is contained in:
parent
0a77b3f334
commit
c7c421b2f5
19 changed files with 212 additions and 185 deletions
|
@ -9,13 +9,15 @@ use snafu::{NoneError, ResultExt, Snafu};
|
|||
pub enum DocsError {
|
||||
WrapASTError {
|
||||
#[snafu(backtrace)]
|
||||
source: ASTError
|
||||
source: ASTError,
|
||||
},
|
||||
WrapModuleError {
|
||||
#[snafu(backtrace)]
|
||||
source: ModuleError
|
||||
source: ModuleError,
|
||||
},
|
||||
WrapSyntaxError {
|
||||
msg: String,
|
||||
},
|
||||
WrapSyntaxError { msg: String },
|
||||
}
|
||||
|
||||
pub type DocsResult<T, E = DocsError> = std::result::Result<T, E>;
|
||||
|
@ -32,16 +34,12 @@ impl<'a> From<SyntaxError<'a>> for DocsError {
|
|||
|
||||
impl From<ASTError> for DocsError {
|
||||
fn from(ast_err: ASTError) -> Self {
|
||||
Self::WrapASTError {
|
||||
source: ast_err,
|
||||
}
|
||||
Self::WrapASTError { source: ast_err }
|
||||
}
|
||||
}
|
||||
|
||||
impl From<ModuleError> for DocsError {
|
||||
fn from(module_err: ModuleError) -> Self {
|
||||
Self::WrapModuleError {
|
||||
source: module_err,
|
||||
}
|
||||
Self::WrapModuleError { source: module_err }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue