ll-sparql-parser 3.0.0

A resilient LL parser for SPARQL
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::{parse_query, syntax_kind::SyntaxKind};

#[test]
fn parse_tokens_after() {
    let input = "SELECT * WHERE {} hay";
    let root = parse_query(input).0;
    assert!(matches!(
        root.last_token().unwrap().kind(),
        SyntaxKind::Error
    ));
}

#[test]
fn parse_tokens_before() {
    let input = "dings;\nCLEAR <GraphRef>;\n";
    let _root = parse_query(input).0;
}