datex-core 0.0.14

The DATEX Core Rust implementation
Documentation
use crate::{
    compiler::context::CompilationContext,
    core_compiler::value_visitor::ValueVisitor, prelude::*,
    runtime::cache::shared_references_cache::SharedReferencesCache,
    shared_values::SharedContainer,
};

impl<'ctx> ValueVisitor for CompilationContext<'ctx> {
    fn visit_shared_container<'a>(
        &'a mut self,
        shared_container: &'a SharedContainer,
        cache: &'a mut SharedReferencesCache,
    ) -> Box<dyn Iterator<Item = crate::instruction::Instruction> + 'a> {
        // Delegate the visit to the shared value tracking system
        self.core_context
            .shared_value_tracking
            .get_mut()
            .visit_shared_container(shared_container, cache)
    }
}