Skip to content

Commit

Permalink
feat: added error and warning kind types (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
Echo-Heo committed Mar 27, 2024
1 parent 8ffdcc1 commit 6caf034
Show file tree
Hide file tree
Showing 2 changed files with 410 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/error.rs
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,
}
Loading

0 comments on commit 6caf034

Please sign in to comment.