--- a/crates/jsonnet-parser/src/lib.rs +++ b/crates/jsonnet-parser/src/lib.rs @@ -7,6 +7,7 @@ use std::{path::PathBuf, rc::Rc}; mod expr; pub use expr::*; +pub use peg; enum Suffix { String(String), @@ -282,10 +283,8 @@ } } -pub fn parse( - str: &str, - settings: &ParserSettings, -) -> Result> { +pub type ParseError = peg::error::ParseError; +pub fn parse(str: &str, settings: &ParserSettings) -> Result { jsonnet_parser::jsonnet(str, settings) }