Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lrlex/src/lib/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ use std::{
static RE_TOKEN_ID: LazyLock<Regex> =
LazyLock::new(|| Regex::new(r"^[a-zA-Z_][a-zA-Z_0-9]*$").unwrap());

#[non_exhaustive]
pub(crate) enum LexerSrcEnvError {
GrmtoolsSectionParseError(Vec<HeaderError<Span>>),
GrmtoolsSectionMergeError(MergeError<String, Box<HeaderValue<Location>>>),
Expand Down Expand Up @@ -229,6 +230,7 @@ where
}
}

#[non_exhaustive]
pub(crate) enum LexerBuildEnvError {}

impl fmt::Display for LexerBuildEnvError {
Expand Down Expand Up @@ -279,6 +281,7 @@ where
}
}

#[non_exhaustive]
pub(crate) enum LexerCodegenError {
InvalidRustIdentifierModName { mod_name: String, error: syn::Error },
}
Expand Down
3 changes: 3 additions & 0 deletions lrpar/src/lib/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const ACTIONS_KIND: &str = "__GtActionsKind";
const ACTIONS_KIND_PREFIX: &str = "Ak";
const ACTIONS_KIND_HIDDEN: &str = "__GtActionsKindHidden";

#[non_exhaustive]
pub(crate) enum ParserSrcEnvError {
GrmtoolsSectionParseError(Vec<HeaderError<Span>>),
GrmtoolsSectionMergeError(MergeError<String, Box<HeaderValue<Location>>>),
Expand All @@ -40,6 +41,7 @@ pub(crate) enum ParserSrcEnvError {
MissingModName,
}

#[non_exhaustive]
pub(crate) enum ParserBuildEnvError<LexerTypesT>
where
LexerTypesT: LexerTypes,
Expand All @@ -51,6 +53,7 @@ where
GrmtoolsSectionMissingRequiredKeys(Vec<String>),
}

#[non_exhaustive]
pub(crate) enum CodegenError {
ProcMacro2Error(proc_macro2::LexError),
InvalidRustIdentifierModName(syn::Error, String),
Expand Down