pub enum StatementType {
Show 16 variants
Eof,
Invalid,
Comment,
TypesettingComment,
HeadingComment(HeadingLevel),
AdditionalInfoComment,
FileInclude,
Axiom,
Provable,
Essential,
Floating,
Disjoint,
OpenGroup,
CloseGroup,
Constant,
Variable,
}
Expand description
An enumeration of statement types, most of which correspond to statements as defined in the Metamath spec.
Variants§
Eof
Psuedo statement used only to record end-of-file whitespace.
Invalid
Statement which is damaged enough that there’s no sense passing it to later stages.
Comment
Comments between statements are recorded as statements in their own right to facilitate handling of date comments and other metadata.
TypesettingComment
A comment which starts with a $t
token and must be interpreted
specially by the HTML generator.
HeadingComment(HeadingLevel)
A comment corresponding to the head of a chapter or section in the outline
AdditionalInfoComment
A comment which starts with a $j
token and must be interpreted
specially by the grammar parser
FileInclude
A $[
directive; we process these as statements, and disallow them
inside other statements, which violates the published Metamath spec but
is allowed behavior as an erratum.
Such statements always end the current segment.
Axiom
A spec $a
statement.
Provable
A spec $p
statement.
Essential
A spec $e
statement.
Floating
A spec $f
statement.
Disjoint
A spec $d
statement.
OpenGroup
A spec ${
statement.
CloseGroup
A spec $}
statement.
Constant
A spec $c
statement.
Variable
A spec $v
statement.
Implementations§
Source§impl StatementType
impl StatementType
Sourcepub const fn is_assertion(self) -> bool
pub const fn is_assertion(self) -> bool
Returns true if this statement is an Axiom
($a
) or Provable
($p
) statement.
Sourcepub const fn takes_label(self) -> bool
pub const fn takes_label(self) -> bool
Returns true if this statement has a label before the keyword: $a $p $e $f
.
Sourcepub const fn takes_math(self) -> bool
pub const fn takes_math(self) -> bool
Returns true if this statement is followed by math tokens: $a $p $e $f $d $c $v
.
Trait Implementations§
Source§impl Clone for StatementType
impl Clone for StatementType
Source§fn clone(&self) -> StatementType
fn clone(&self) -> StatementType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for StatementType
impl Debug for StatementType
Source§impl Default for StatementType
impl Default for StatementType
Source§fn default() -> StatementType
fn default() -> StatementType
Source§impl PartialEq for StatementType
impl PartialEq for StatementType
impl Copy for StatementType
impl Eq for StatementType
impl StructuralPartialEq for StatementType
Auto Trait Implementations§
impl Freeze for StatementType
impl RefUnwindSafe for StatementType
impl Send for StatementType
impl Sync for StatementType
impl Unpin for StatementType
impl UnwindSafe for StatementType
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,
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