Skip to content

Commit

Permalink
Fix typo in Conjunction rule
Browse files Browse the repository at this point in the history
  • Loading branch information
althonos committed Feb 26, 2024
1 parent ff54c85 commit 61c27c8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/frames.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,4 @@ impl<A: ForIRI> From<ObjectPropertyExpression<A>> for InverseObjectPropertyFrame
fn from(ope: ObjectPropertyExpression<A>) -> Self {
Self::new(ope)
}
}
}
12 changes: 6 additions & 6 deletions src/from_pair.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ use crate::frames::AnnotationPropertyFrame;
use crate::frames::ClassFrame;
use crate::frames::DataPropertyFrame;
use crate::frames::DatatypeFrame;
use crate::frames::MiscClause;
use crate::frames::InverseObjectPropertyFrame;
use crate::frames::IndividualFrame;
use crate::frames::InverseObjectPropertyFrame;
use crate::frames::MiscClause;
use crate::frames::ObjectPropertyFrame;
use crate::parser::Rule;
use crate::Context;
Expand Down Expand Up @@ -355,11 +355,11 @@ fn from_primary_pair<A: ForIRI>(
}
}

fn from_conjuction_pair<A: ForIRI>(
fn from_conjunction_pair<A: ForIRI>(
pair: Pair<Rule>,
ctx: &Context<'_, A>,
) -> Result<ClassExpression<A>> {
debug_assert!(pair.as_rule() == Rule::Conjuction);
debug_assert!(pair.as_rule() == Rule::Conjunction);

let mut inner = pair.into_inner().peekable();
match inner.peek().unwrap().as_rule() {
Expand Down Expand Up @@ -398,11 +398,11 @@ impl<A: ForIRI> FromPair<A> for ClassExpression<A> {
fn from_pair_unchecked(pair: Pair<Rule>, ctx: &Context<'_, A>) -> Result<Self> {
let mut inner = pair.into_inner();
if inner.len() == 1 {
from_conjuction_pair(inner.next().unwrap(), ctx)
from_conjunction_pair(inner.next().unwrap(), ctx)
} else {
Ok(ClassExpression::ObjectUnionOf(
inner
.map(|pair| from_conjuction_pair(pair, ctx))
.map(|pair| from_conjunction_pair(pair, ctx))
.collect::<Result<_>>()?,
))
}
Expand Down
4 changes: 2 additions & 2 deletions src/omn.pest
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ RestrictionValue = { Literal }

// 2.4 Descriptions

Description = { Conjuction ~ (KEYWORD_OR ~ Conjuction)* }
Conjuction = {
Description = { Conjunction ~ (KEYWORD_OR ~ Conjunction)* }
Conjunction = {
(ClassIRI ~ "that" ~ KEYWORD_NOT? ~ Restriction ~ ( KEYWORD_AND ~ KEYWORD_NOT? ~ Restriction )*)
| (Primary ~ (KEYWORD_AND ~ Primary)*)
}
Expand Down
4 changes: 2 additions & 2 deletions src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,9 @@ mod tests {
}

#[test]
fn conjuction() {
fn conjunction() {
assert_parse!(
Rule::Conjuction,
Rule::Conjunction,
r#"owl:Thing that hasFirstName exactly 1 and hasFirstName only string[minLength 1]"#
);
}
Expand Down

0 comments on commit 61c27c8

Please sign in to comment.