2024-02-25 18:49:26 +00:00
|
|
|
use crate::{context::Context, error::RuntimeError};
|
|
|
|
|
|
|
|
use super::{AbstractTree, Statement, Value};
|
|
|
|
|
2024-02-25 19:26:22 +00:00
|
|
|
#[derive(Clone, Debug, Eq, PartialEq, PartialOrd, Ord)]
|
2024-02-25 18:49:26 +00:00
|
|
|
pub struct Block {
|
|
|
|
statements: Vec<Statement>,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Block {
|
|
|
|
pub fn new(statements: Vec<Statement>) -> Self {
|
|
|
|
Self { statements }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl AbstractTree for Block {
|
|
|
|
fn run(self, _: &Context) -> Result<Value, RuntimeError> {
|
|
|
|
todo!()
|
|
|
|
}
|
|
|
|
}
|