Skip to content

Commit

Permalink
chore: commit missing files
Browse files Browse the repository at this point in the history
  • Loading branch information
gabotechs committed Oct 12, 2023
1 parent 2181334 commit c6e21b5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions graphqxl_parser/src/utils/custom_error.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
use crate::parser::{Rule, RuleError};
use pest::iterators::Pair;

pub(crate) fn custom_error(pair: Pair<Rule>, message: &str) -> Box<RuleError> {
Box::new(pest::error::Error::new_from_span(
pest::error::ErrorVariant::CustomError {
message: message.into(),
},
pair.as_span(),
))
}

0 comments on commit c6e21b5

Please sign in to comment.