14 lines
316 B
Rust
14 lines
316 B
Rust
|
use crate::{expression::Expression, token::Token};
|
||
|
|
||
|
/// Enumeration of all types of statements.
|
||
|
#[derive(Debug, Clone, PartialEq)]
|
||
|
pub enum Statement {
|
||
|
Block(Vec<Statement>),
|
||
|
Print(Expression),
|
||
|
Expression(Expression),
|
||
|
Var {
|
||
|
name: Token,
|
||
|
initializer: Box<Option<Expression>>,
|
||
|
},
|
||
|
}
|