nquads-syntax 0.20.0

RDF 1.1 N-Quads parser with code mapping metadata
Documentation
use nquads_syntax::NquadsParse;
use std::path::Path;

fn parse<P: AsRef<Path>>(path: P) {
	let _ = env_logger::builder().is_test(true).try_init();
	match std::fs::read_to_string(&path) {
		Ok(buffer) => {
			match nquads_syntax::NquadDocument::parse_str(&buffer) {
				Ok(_) => (), // success!
				Err(e) => {
					log::error!("parse error: {e}");
					panic!("parse error: {e:?}")
				}
			}
		}
		Err(e) => {
			log::error!("unable to read file `{}`: {}", path.as_ref().display(), e);
			panic!("IO error: {e:?}")
		}
	}
}

#[test]
fn p01() {
	parse("tests/positive/01.nq")
}

#[test]
fn p02() {
	parse("tests/positive/02.nq")
}

#[test]
fn p03() {
	parse("tests/positive/03.nq")
}

#[test]
fn p04() {
	parse("tests/positive/04.nq")
}