pub enum DeclarationErrorKind {
EmptyEntry,
UnknownLikeTarget {
target: SmolStr,
},
MissingCloser,
MissingOpener,
VerbatimTarget,
TargetTakesArguments,
UndeclaredTarget,
DuplicateDelimiter {
name: CommandName,
first: SmolStr,
},
RepeatedDelimiter {
name: CommandName,
},
NotAControlWord {
name: CommandName,
},
SpellingIsABuiltinCommand {
name: CommandName,
},
}Expand description
Why a declaration was rejected. Each variant is a rule from
AGENTS.md decision #12 or its architecture section.
Variants§
EmptyEntry
An entry with no keys at all. Nothing to reject it on rule grounds, and nothing for it to do either — which is the outcome this module exists to avoid.
UnknownLikeTarget
like named something the curated built-in database does not have.
Never resolved against the CWL tier or scanned definitions: behavior
comes from curated data only.
MissingCloser
begin without end. An opener with no closer can never pair, so the
declaration would do nothing at all.
MissingOpener
end without begin, the mirror.
VerbatimTarget
Delimiter spellings for a verbatim environment. Not conservatism but TeX truth, which is why it is rejected rather than merely discouraged.
TargetTakesArguments
Delimiter spellings for an environment that takes arguments. A bare control word carries none, and attaching them from the target’s signature would be arity-directed grouping from declaration data.
UndeclaredTarget
Delimiter spellings for an environment whose behavior is unknown — no
like, and no built-in of that name.
DuplicateDelimiter
A spelling two entries both claim. Silently letting the last one win would make the pairing depend on map order.
RepeatedDelimiter
A spelling one entry lists twice — across its two sides, or twice on
one. The DuplicateDelimiter mistake seen
from inside a single entry, where naming the “other” entry is no help.
Fields
name: CommandNameNotAControlWord
A spelling the lexer could never produce as one control word, so it could never match anything.
Fields
name: CommandNameSpellingIsABuiltinCommand
A spelling the curated database already knows as a command. Not a no-op — it would take effect, on a command the project did not mean to redefine.
Fields
name: CommandNameTrait Implementations§
Source§impl Clone for DeclarationErrorKind
impl Clone for DeclarationErrorKind
Source§fn clone(&self) -> DeclarationErrorKind
fn clone(&self) -> DeclarationErrorKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more