Skip to main content

litex/execute/
exec_tooling_stmt.rs

1use crate::prelude::*;
2
3impl Runtime {
4    pub fn exec_import_stmt(&mut self, stmt: &ImportStmt) -> Result<StmtResult, RuntimeError> {
5        return Err(RuntimeError::ExecStmtError({
6            let st: Stmt = stmt.clone().into();
7            let lf = st.line_file();
8            RuntimeErrorStruct::new(Some(st), "".to_string(), lf, None, vec![])
9        }));
10    }
11
12    pub fn exec_do_nothing_stmt(
13        &mut self,
14        stmt: &DoNothingStmt,
15    ) -> Result<StmtResult, RuntimeError> {
16        return Ok(
17            (NonFactualStmtSuccess::new(stmt.clone().into(), InferResult::new(), vec![])).into(),
18        );
19    }
20
21    pub fn exec_clear_stmt(&mut self, stmt: &ClearStmt) -> Result<StmtResult, RuntimeError> {
22        self.clear_current_env_and_parse_name_scope();
23        Ok((NonFactualStmtSuccess::new(stmt.clone().into(), InferResult::new(), vec![])).into())
24    }
25
26    pub fn exec_run_file_stmt(&mut self, stmt: &RunFileStmt) -> Result<StmtResult, RuntimeError> {
27        return Err(RuntimeError::ExecStmtError({
28            let st: Stmt = stmt.clone().into();
29            let lf = st.line_file();
30            RuntimeErrorStruct::new(Some(st), "".to_string(), lf, None, vec![])
31        }));
32    }
33}