diff --git a/crates/json-pawarser/src/syntax_error.rs b/crates/json-pawarser/src/syntax_error.rs index 6ff9067..84377d7 100644 --- a/crates/json-pawarser/src/syntax_error.rs +++ b/crates/json-pawarser/src/syntax_error.rs @@ -1,6 +1,6 @@ use crate::syntax_kind::SyntaxKind; -#[derive(Clone)] +#[derive(Clone, PartialEq, Eq)] pub enum SyntaxError { DisallowedKeyType(SyntaxKind), MemberMissingValue, diff --git a/crates/pawarser/src/parser.rs b/crates/pawarser/src/parser.rs index 91d44b8..bc4724f 100644 --- a/crates/pawarser/src/parser.rs +++ b/crates/pawarser/src/parser.rs @@ -13,7 +13,7 @@ pub mod marker; /// this is used to define some required SyntaxKinds like an EOF token or an error token pub trait SyntaxElement where - Self: EnumSetType + Into + Clone, + Self: EnumSetType + Into + Clone + PartialEq + Eq, { /// EOF value. This will be used by the rest of the parser library to represent an EOF. const EOF: Self; diff --git a/crates/pawarser/src/parser/error.rs b/crates/pawarser/src/parser/error.rs index ba52ff0..07c033d 100644 --- a/crates/pawarser/src/parser/error.rs +++ b/crates/pawarser/src/parser/error.rs @@ -2,6 +2,6 @@ // TODO: constrain that conversion to `NodeKind::Error` is enforced to be possible pub trait SyntaxError where - Self: Clone, + Self: Clone + PartialEq + Eq, { } diff --git a/crates/pawarser/src/parser/event.rs b/crates/pawarser/src/parser/event.rs index 3cd0ef5..1b71d8e 100644 --- a/crates/pawarser/src/parser/event.rs +++ b/crates/pawarser/src/parser/event.rs @@ -22,7 +22,7 @@ impl Event { Tombstone, Syntax(SyntaxKind),