summary refs log tree commit diff stats
path: root/src/errors.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/errors.rs')
-rw-r--r--src/errors.rs13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/errors.rs b/src/errors.rs
index 9b0025e..877e5f5 100644
--- a/src/errors.rs
+++ b/src/errors.rs
@@ -12,6 +12,7 @@
 /// "String" here refers to a string literal in the pattern, not the input
 /// string. The input string is referred to as "the pattern".
 #[derive(Debug)]
+#[non_exhaustive]
 pub enum PatternError<'a> {
     // Syntax Errors:
 
@@ -34,15 +35,21 @@ pub enum PatternError<'a> {
     UnknownPredicate(usize, &'a str),
     /// The pattern contains an invalid regex.
     Regex(usize, &'a str, ::regex::Error),
+
+    // Extra Errors:
+
+    /// The pattern contains a token which has not yet been implemented.
+    Unimplemented(usize, &'a str),
 }
 
 // /// These are errors that may be returned by the matcher when matching a
 // /// pattern.
 // #[derive(Clone, Debug)]
+#[non_exhaustive]
 pub enum MatchError {
-//     /// Returned if the pattern nests too deeply.
-//     StackOverflow,
-//     /// Returned if the pattern rejects the input.
+     /// Returned if the pattern nests too deeply.
+     StackOverflow,
+     /// Returned if the pattern rejects the input.
      ValidationError,
 //     /// Returned if the pattern attempts an unsupported operation.
 //     ///