summaryrefslogtreecommitdiff
path: root/cli/ast.rs
diff options
context:
space:
mode:
Diffstat (limited to 'cli/ast.rs')
-rw-r--r--cli/ast.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/cli/ast.rs b/cli/ast.rs
index 8814bf297..846967331 100644
--- a/cli/ast.rs
+++ b/cli/ast.rs
@@ -1,8 +1,7 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
use crate::msg::MediaType;
-
-use deno_core::ErrBox;
+use deno_core::error::AnyError;
use deno_core::ModuleSpecifier;
use std::error::Error;
use std::fmt;
@@ -43,7 +42,7 @@ use swc_ecmascript::transforms::react;
use swc_ecmascript::transforms::typescript;
use swc_ecmascript::visit::FoldWith;
-type Result<V> = result::Result<V, ErrBox>;
+type Result<V> = result::Result<V, AnyError>;
static TARGET: JscTarget = JscTarget::Es2020;
@@ -357,9 +356,9 @@ pub fn parse(
let mut diagnostic = err.into_diagnostic(&handler);
diagnostic.emit();
- ErrBox::from(DiagnosticBuffer::from_error_buffer(error_buffer, |span| {
+ DiagnosticBuffer::from_error_buffer(error_buffer, |span| {
sm.lookup_char_pos(span.lo)
- }))
+ })
})?;
let leading_comments =
comments.with_leading(module.span.lo, |comments| comments.to_vec());