use iref::IriBuf;
pub mod lexing;
pub mod parsing;
pub use lexing::Lexer;
use locspan::{Meta, Span};
pub use parsing::Parse;
pub use rdf_types::{BlankIdBuf, GraphLabel, Subject};
use rdf_types::{Id, Object, Term};
pub type Quad =
rdf_types::Quad<Meta<Id, Span>, Meta<IriBuf, Span>, Meta<Object, Span>, Meta<GraphLabel, Span>>;
pub type GrdfQuad = rdf_types::Quad<Meta<Term, Span>>;
pub type Document = Vec<Meta<Quad, Span>>;
pub type GrdfDocument = Vec<Meta<GrdfQuad, Span>>;
#[allow(clippy::type_complexity)]
pub fn strip_quad<S, P, O, G, M>(
quad: rdf_types::Quad<Meta<S, M>, Meta<P, M>, Meta<O, M>, Meta<G, M>>,
) -> rdf_types::Quad<S, P, O, G> {
quad.map_all(Meta::into_value, Meta::into_value, Meta::into_value, |g| {
g.map(Meta::into_value)
})
}