pub struct IfStatement {
pub if_token: _If,
pub condition: Box<Expr>,
pub then_clause: ThenClause,
pub else_clause: Option<ElseClause>,
}Expand description
A typed Macaulay2 if_statement syntax node.
Fields§
§if_token: _IfThe if_token child of this syntax node.
condition: Box<Expr>The condition child of this syntax node.
then_clause: ThenClauseThe then_clause child of this syntax node.
else_clause: Option<ElseClause>The else_clause child of this syntax node.
Implementations§
Source§impl IfStatement
impl IfStatement
Sourcepub fn new(
if_token: _If,
condition: Expr,
then_clause: ThenClause,
else_clause: Option<ElseClause>,
) -> Self
pub fn new( if_token: _If, condition: Expr, then_clause: ThenClause, else_clause: Option<ElseClause>, ) -> Self
Creates this node from its typed children.
Trait Implementations§
Source§impl Debug for IfStatement
impl Debug for IfStatement
Source§impl From<IfStatement> for Component
impl From<IfStatement> for Component
Source§fn from(value: IfStatement) -> Self
fn from(value: IfStatement) -> Self
Converts to this type from the input type.
Source§impl From<IfStatement> for Expr
impl From<IfStatement> for Expr
Source§fn from(value: IfStatement) -> Self
fn from(value: IfStatement) -> Self
Converts to this type from the input type.
Source§impl Lex for IfStatement
impl Lex for IfStatement
Source§fn to_tokens(&self, output: &mut TokenStream)
fn to_tokens(&self, output: &mut TokenStream)
Appends this value’s token trees to
output.Source§fn to_token_stream(&self) -> TokenStream
fn to_token_stream(&self) -> TokenStream
Emits this value into a fresh token stream.
Source§impl<N> Migrate<N> for IfStatementwhere
N: ExternalCstNode,
impl<N> Migrate<N> for IfStatementwhere
N: ExternalCstNode,
Source§impl PrettyTree for IfStatement
impl PrettyTree for IfStatement
Source§fn pretty_tree(&self) -> PrettyNode
fn pretty_tree(&self) -> PrettyNode
Builds the presentation node for this syntax value.
Auto Trait Implementations§
impl Freeze for IfStatement
impl RefUnwindSafe for IfStatement
impl Send for IfStatement
impl Sync for IfStatement
impl Unpin for IfStatement
impl UnsafeUnpin for IfStatement
impl UnwindSafe for IfStatement
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
Mutably borrows from an owned value. Read more