Use pub in rustpeg code

pull/10/head
Tpt 6 years ago
parent da78cf5dff
commit f924821c79
  1. 3
      src/rio/ntriples/ntriples_grammar.rustpeg
  2. 3
      src/rio/turtle/turtle_grammar.rustpeg
  3. 3
      src/sparql/sparql_grammar.rustpeg

@ -9,8 +9,7 @@ use std::collections::BTreeMap;
#![arguments(bnodes_map: &mut BTreeMap<String, BlankNode>)]
//[2]
#[pub]
triple -> Option<Triple> =
pub triple -> Option<Triple> =
_ s:subject _ p:predicate _ o:object _ "." _ comment? EOL? { Some(Triple::new(s, p, o)) } /
_ comment? EOL? { None }

@ -8,8 +8,7 @@ use std::iter;
#![arguments(state: &mut ParserState, buffer: &mut Vec<Triple>)]
//[1]
#[pub]
turtleDoc -> () = _ (statement _)*
pub turtleDoc -> () = _ (statement _)*
//[2]
statement -> () = directive / triples "."

@ -10,8 +10,7 @@ use std::str::FromStr;
//[1]
#[pub]
QueryUnit -> Query = Query
pub QueryUnit -> Query = Query
//[2]
Query -> Query = _ Prologue _ q:(SelectQuery / ConstructQuery / DescribeQuery / AskQuery) _ { //TODO: ValuesClause

Loading…
Cancel
Save