pub enum CommandCode {
Show 15 variants
Escape = 0,
BeginGroup = 1,
EndGroup = 2,
MathShift = 3,
AlignmentTab = 4,
EOF = 5,
Parameter = 6,
Superscript = 7,
Subscript = 8,
Primitive = 9,
Space = 10,
Letter = 11,
Other = 12,
Active = 13,
Argument = 14,
}Expand description
After scanning a file, CategoryCodes such as EOL,
Comment or Invalid
can not occur anymore. Instead, a Token can represent e.g. a
numbered parameter (e.g. #1 in a macro expansion), or an end-of-file, or
a \noexpand marker, or a marker for the end of an alignment cell, etc.
Variants§
Escape = 0
Escape character (0); usually \
BeginGroup = 1
Begin group character (1); usually {
EndGroup = 2
End group character (2); usually }
MathShift = 3
Math shift character (3); usually $
AlignmentTab = 4
Alignment tab character (4); usually &
EOF = 5
End of file marker`
Parameter = 6
Parameter character (6); usually #
Superscript = 7
Superscript character (7); usually ^
Subscript = 8
Subscript character (8); usually _
Primitive = 9
marker for a primitive command
Space = 10
Space character (10); usually
Letter = 11
Letter character (11), usually a-z and A-Z
Other = 12
Other character (12), usually e.g. @, !, ?, etc.
Active = 13
Active character (13); usually ~
Argument = 14
Argument Marker
Implementations§
Trait Implementations§
Source§impl Clone for CommandCode
impl Clone for CommandCode
Source§fn clone(&self) -> CommandCode
fn clone(&self) -> CommandCode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CommandCode
impl Debug for CommandCode
Source§impl From<CategoryCode> for CommandCode
impl From<CategoryCode> for CommandCode
Source§fn from(value: CategoryCode) -> Self
fn from(value: CategoryCode) -> Self
Source§impl PartialEq for CommandCode
impl PartialEq for CommandCode
Source§impl TryFrom<u8> for CommandCode
impl TryFrom<u8> for CommandCode
impl Copy for CommandCode
impl Eq for CommandCode
impl StructuralPartialEq for CommandCode
Auto Trait Implementations§
impl Freeze for CommandCode
impl RefUnwindSafe for CommandCode
impl Send for CommandCode
impl Sync for CommandCode
impl Unpin for CommandCode
impl UnsafeUnpin for CommandCode
impl UnwindSafe for CommandCode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more