Enum glsl::syntax::SimpleStatement [−][src]
pub enum SimpleStatement { Declaration(Declaration), Expression(ExprStatement), Selection(SelectionStatement), Switch(SwitchStatement), CaseLabel(CaseLabel), Iteration(IterationStatement), Jump(JumpStatement), }
Simple statement.
Variants
Declaration(Declaration)
Expression(ExprStatement)
Selection(SelectionStatement)
Switch(SwitchStatement)
CaseLabel(CaseLabel)
Iteration(IterationStatement)
Jump(JumpStatement)
Implementations
impl SimpleStatement
[src]
impl SimpleStatement
[src]pub fn new_expr<E>(expr: E) -> Self where
E: Into<Expr>,
[src]
E: Into<Expr>,
Create a new expression statement.
pub fn new_if_else<If, True, False>(ife: If, truee: True, falsee: False) -> Self where
If: Into<Expr>,
True: Into<Statement>,
False: Into<Statement>,
[src]
If: Into<Expr>,
True: Into<Statement>,
False: Into<Statement>,
Create a new selection statement (if / else).
pub fn new_switch<H, B>(head: H, body: B) -> Self where
H: Into<Expr>,
B: IntoIterator<Item = Statement>,
[src]
H: Into<Expr>,
B: IntoIterator<Item = Statement>,
Create a new switch statement.
A switch statement is always composed of a SimpleStatement::Switch
block, that contains it
all, and has as body a compound list of case statements.
pub fn new_while<C, S>(cond: C, body: S) -> Self where
C: Into<Condition>,
S: Into<Statement>,
[src]
C: Into<Condition>,
S: Into<Statement>,
Create a new while statement.
pub fn new_do_while<C, S>(body: S, cond: C) -> Self where
S: Into<Statement>,
C: Into<Expr>,
[src]
S: Into<Statement>,
C: Into<Expr>,
Create a new do-while statement.
Trait Implementations
impl Clone for SimpleStatement
[src]
impl Clone for SimpleStatement
[src]fn clone(&self) -> SimpleStatement
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Parse for SimpleStatement
[src]
impl Parse for SimpleStatement
[src]impl PartialEq<SimpleStatement> for SimpleStatement
[src]
impl PartialEq<SimpleStatement> for SimpleStatement
[src]