use crate::backend::Backend;
use crate::types::{FileId, GrugEntity, Value};
use crate::ast::GrugAst;
use gruggers_core::state::State;
pub struct StubBackend;
impl Backend for StubBackend {
fn insert_file(&self, _id: FileId, _file: &GrugAst) { }
fn init_entity<GrugState: State>(&self, _state: &GrugState, _entity: &GrugEntity) -> bool {
panic!("Tried to initialize entity with stub backend");
}
fn clear_entities(&mut self) { }
unsafe fn destroy_entity_data(&self, _entity: &GrugEntity) { }
unsafe fn call_on_function_raw<GrugState: State>(&self, _state: &GrugState, _entity: &GrugEntity, _on_fn_index: usize, _values: *const Value) -> bool {
panic!("Tried to call export function with stub backend");
}
fn call_on_function<GrugState: State>(&self, _state: &GrugState, _entity: &GrugEntity, _on_fn_index: usize, _values: &[Value]) -> bool {
panic!("Tried to call export function with stub backend");
}
fn raise_runtime_error<GrugState: State>(&self, _state: &GrugState, _message: &str) {
panic!();
}
}