Expand description
Data structure and parser for a statement.
Re-exports§
pub use assign::Assign;
pub use declare::Declare;
pub use function_call::FunctionCall;
pub use if_statement::If;
pub use return_statement::Return;
pub use while_statement::While;
Modules§
- Assign statement like
a = b
. - Variable declaration like
let a: i32 = 1;
. - Expressions like
a + b
, used in other statements. - Function call statement like
a();
. if
statement likeif a { let b: i32 = 1; } else { let c: i32 = 2; }
.return
statement likereturn a;
.while
statement likewhile a { let b: i32 = 1; a = a - 1; }
.
Enums§
- A statement in the source code, can be either a trivial statement which ends with a
;
or a complex statement likeif
andwhile
.
Traits§
- Tag trait for
Statement
.
Functions§
- Parse source code to get a
Statement
.