Skip to main content

litex/stmt/
eval_stmt.rs

1use crate::prelude::*;
2use std::fmt;
3
4#[derive(Clone)]
5pub struct EvalStmt {
6    pub obj_to_eval: Obj,
7    pub line_file: LineFile,
8}
9
10impl fmt::Display for EvalStmt {
11    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
12        write!(f, "{} {}", EVAL, self.obj_to_eval)
13    }
14}
15
16impl EvalStmt {
17    pub fn new(obj_to_eval: Obj, line_file: LineFile) -> Self {
18        EvalStmt {
19            obj_to_eval,
20            line_file,
21        }
22    }
23}