Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c24f0f8

Browse files
committed
Small change in ShEx grammar
1 parent 2cfc8c5 commit c24f0f8

File tree

3 files changed

+22
-4
lines changed

3 files changed

+22
-4
lines changed

examples/shex/compare1.shex

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
prefix : <http://example.org/>
2+
3+
:Person {
4+
:name xsd:string ;
5+
:age xsd: int;
6+
:worksFor @:Organization ? ;
7+
:knows @:Person *
8+
}
9+
10+
:Organization {
11+
:name xsd:string ;
12+
:address xsd:string ? ;
13+
}

examples/shex/compare2.shex

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
prefix : <http://example.org/>
2+
3+
:Person {
4+
:email IRI ;
5+
:name xsd:string ;
6+
:birthDate xsd:date ?;
7+
:knows @:Person * ;
8+
}

shex_compact/src/shex_grammar.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1848,10 +1848,7 @@ fn rest_range<'a>() -> impl FnMut(Span<'a>) -> IRes<'a, Option<i32>> {
18481848

18491849
/// From rest_range, integer_or_star = INTEGER | "*"
18501850
fn integer_or_star(i: Span) -> IRes<i32> {
1851-
alt((
1852-
map(integer(), |n| n as i32),
1853-
(map(token_tws("*"), |_| (-1))),
1854-
))(i)
1851+
alt((map(integer(), |n| n as i32), (map(token_tws("*"), |_| -1))))(i)
18551852
}
18561853

18571854
/// `[69] <RDF_TYPE> ::= "a"`

0 commit comments

Comments
 (0)