-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added error and warning kind types (2)
- Loading branch information
Showing
2 changed files
with
410 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/// Kinds of errors | ||
#[derive(Debug, Clone, Copy)] | ||
pub enum ErrorKind { | ||
/// general error from `pest` | ||
SyntaxError, | ||
/// for `include` and `embed` directives, when failing to load the file | ||
CouldNotLoad, | ||
NameConflict, | ||
/// cyclic definition from `define` directive | ||
CyclicDefinition, | ||
} | ||
|
||
#[derive(Debug, Clone, Copy)] | ||
pub enum WarningKind { | ||
/// for when the literal used is an unlikely type | ||
LikelyError, | ||
/// for when the literal goes out of the range of the capacity of the immediate value | ||
OutOfRange, | ||
} |
Oops, something went wrong.