1use iref::IriBuf;
6
7pub mod lexing;
8pub mod parsing;
9
10pub use lexing::Lexer;
11use locspan::{Meta, Span};
12pub use parsing::Parse;
13pub use rdf_types::{BlankIdBuf, GraphLabel, Subject};
14use rdf_types::{Id, Object, Term};
15
16pub type Quad =
17 rdf_types::Quad<Meta<Id, Span>, Meta<IriBuf, Span>, Meta<Object, Span>, Meta<GraphLabel, Span>>;
18
19pub type GrdfQuad = rdf_types::Quad<Meta<Term, Span>>;
20
21pub type Document = Vec<Meta<Quad, Span>>;
23
24pub type GrdfDocument = Vec<Meta<GrdfQuad, Span>>;
26
27#[allow(clippy::type_complexity)]
29pub fn strip_quad<S, P, O, G, M>(
30 quad: rdf_types::Quad<Meta<S, M>, Meta<P, M>, Meta<O, M>, Meta<G, M>>,
31) -> rdf_types::Quad<S, P, O, G> {
32 quad.map_all(Meta::into_value, Meta::into_value, Meta::into_value, |g| {
33 g.map(Meta::into_value)
34 })
35}