use std::collections::HashMap;
mod bibtex;
mod csl_json;
mod csl_yaml;
mod index;
mod ris;
pub use bibtex::{BibtexEntry, parse_bibtex, parse_bibtex_full};
pub use csl_json::{parse_csl_json_entries, parse_csl_json_full};
pub use csl_yaml::{parse_csl_yaml_entries, parse_csl_yaml_full};
pub use index::{
BibDuplicate, BibEntry, BibEntryLocation, BibFormat, BibIndex, BibLoadError, load_bibliography,
load_bibliography_from_text,
};
pub use ris::{parse_ris_entries, parse_ris_full, validate_ris};
pub(crate) type ParsedEntry = (String, Option<String>, HashMap<String, String>, Span);
#[derive(Debug, Clone)]
pub struct BibError {
pub message: String,
pub span: Option<Span>,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct Span {
pub start: usize,
pub end: usize,
}
#[derive(Debug, Default, Clone)]
pub struct BibtexDatabase {
pub entries: Vec<BibtexEntry>,
pub entry_index: HashMap<String, usize>,
pub errors: Vec<BibError>,
}