pub enum DeclarationErrorKind {
Show 14 variants
EmptyCommandEntry,
InvalidCommandName {
name: SmolStr,
},
BuiltinCommandName {
name: SmolStr,
},
UnknownCommandLikeTarget {
target: SmolStr,
},
EmptyEntry,
UnknownLikeTarget {
target: SmolStr,
},
VerbatimTarget,
TargetTakesArguments,
UndeclaredTarget,
DuplicateDelimiter {
name: CommandName,
first: SmolStr,
},
RepeatedDelimiter {
name: CommandName,
},
SpellingIsALiteralDelimiter {
name: CommandName,
environment: SmolStr,
},
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§
EmptyCommandEntry
A [commands.<name>] entry without its required like target.
InvalidCommandName
A command map key that could never lex as one control word.
BuiltinCommandName
A declaration attempted to reclassify a curated built-in command.
UnknownCommandLikeTarget
like did not name a curated reference or citation command.
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.
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: CommandNameSpellingIsALiteralDelimiter
A spelling that is the written-out delimiter (\end{split}) rather
than a command standing in for one. A special case of
NotAControlWord with its own fix: the literal
delimiter is already a spelling of both sides, so the key is redundant.
NotAControlWord
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