diff --git a/lrlex/src/lib/codegen.rs b/lrlex/src/lib/codegen.rs index 570745345..0b9e356e9 100644 --- a/lrlex/src/lib/codegen.rs +++ b/lrlex/src/lib/codegen.rs @@ -21,6 +21,7 @@ use std::{ static RE_TOKEN_ID: LazyLock = LazyLock::new(|| Regex::new(r"^[a-zA-Z_][a-zA-Z_0-9]*$").unwrap()); +#[non_exhaustive] pub(crate) enum LexerSrcEnvError { GrmtoolsSectionParseError(Vec>), GrmtoolsSectionMergeError(MergeError>>), @@ -229,6 +230,7 @@ where } } +#[non_exhaustive] pub(crate) enum LexerBuildEnvError {} impl fmt::Display for LexerBuildEnvError { @@ -279,6 +281,7 @@ where } } +#[non_exhaustive] pub(crate) enum LexerCodegenError { InvalidRustIdentifierModName { mod_name: String, error: syn::Error }, } diff --git a/lrpar/src/lib/codegen.rs b/lrpar/src/lib/codegen.rs index d36cc4874..65ddb7948 100644 --- a/lrpar/src/lib/codegen.rs +++ b/lrpar/src/lib/codegen.rs @@ -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>), GrmtoolsSectionMergeError(MergeError>>), @@ -40,6 +41,7 @@ pub(crate) enum ParserSrcEnvError { MissingModName, } +#[non_exhaustive] pub(crate) enum ParserBuildEnvError where LexerTypesT: LexerTypes, @@ -51,6 +53,7 @@ where GrmtoolsSectionMissingRequiredKeys(Vec), } +#[non_exhaustive] pub(crate) enum CodegenError { ProcMacro2Error(proc_macro2::LexError), InvalidRustIdentifierModName(syn::Error, String),