summary refs log tree commit diff stats
path: root/src/errors.rs
diff options
context:
space:
mode:
authorSoniEx2 <endermoneymod@gmail.com>2022-10-04 22:44:46 -0300
committerSoniEx2 <endermoneymod@gmail.com>2022-10-04 22:44:46 -0300
commitf0e944696144016ca59aaed02381f7ea9d1ef848 (patch)
treed9c3232b920e3cd2358c3d91ee5ec5d26cec26a1 /src/errors.rs
parent83d575f8a143ba031f1aa43995f6809470b8b15c (diff)
Initial VM work
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.
 //     ///