Make decodal the published library crate
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use decodal_core::{
|
||||
use decodal::{
|
||||
Data, Diagnostic, DiagnosticKind, EmptyLoader, Engine, LoadedSource, SourceId, SourceLoader,
|
||||
Span, format_diagnostic_with,
|
||||
};
|
||||
@@ -81,7 +81,7 @@ impl SourceLoader for VirtualLoader {
|
||||
&mut self,
|
||||
current_key: Option<&str>,
|
||||
specifier: &str,
|
||||
) -> decodal_core::Result<LoadedSource> {
|
||||
) -> decodal::Result<LoadedSource> {
|
||||
let key = resolve_import(current_key, specifier).ok_or_else(|| {
|
||||
Diagnostic::new(
|
||||
DiagnosticKind::Import,
|
||||
@@ -139,7 +139,7 @@ fn normalize_path(path: &str) -> Option<String> {
|
||||
}
|
||||
}
|
||||
|
||||
fn format_diagnostic_with_root(diagnostic: &decodal_core::Diagnostic, root_name: &str) -> String {
|
||||
fn format_diagnostic_with_root(diagnostic: &decodal::Diagnostic, root_name: &str) -> String {
|
||||
format_diagnostic_with(diagnostic, |source| {
|
||||
(source == SourceId(0)).then_some(root_name)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user