summaryrefslogtreecommitdiff
path: root/src/error.rs
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2023-12-27 18:19:12 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2023-12-27 18:19:12 +0000
commitda1774ea591a7c0bc241e4d0c16649a1cf485c13 (patch)
tree43c4744453a2170e78a9d943b4608cf8103fb77d /src/error.rs
parent439bbfe88e971bfa5f07a1faec8ff4a48bbeeb86 (diff)
downloadsubplot-da1774ea591a7c0bc241e4d0c16649a1cf485c13.tar.gz
bindings: Add warnings for missing capture names or missing capture types
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'src/error.rs')
-rw-r--r--src/error.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/error.rs b/src/error.rs
index 7c63ca4..b89e94b 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -394,6 +394,14 @@ pub enum Warning {
/// A code block has an identifier but is not marked as a file or example
#[error("Code block has identifier but lacks file or example class. Is this a mistake? #{0} at {1}")]
MissingAppropriateClassOnNamedCodeBlock(String, String),
+
+ /// A capture in a binding is missing a name
+ #[error("{0}: {1} - missing a name for the {2} capture")]
+ MissingCaptureName(PathBuf, String, String),
+
+ /// A capture in a binding is missing a type
+ #[error("{0}: {1} - missing a type for the capture called {2}")]
+ MissingCaptureType(PathBuf, String, String),
}
/// A list of warnings.