diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2023-12-27 18:19:12 +0000 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2023-12-27 18:19:12 +0000 |
commit | da1774ea591a7c0bc241e4d0c16649a1cf485c13 (patch) | |
tree | 43c4744453a2170e78a9d943b4608cf8103fb77d /src/error.rs | |
parent | 439bbfe88e971bfa5f07a1faec8ff4a48bbeeb86 (diff) | |
download | subplot-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.rs | 8 |
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. |