fn with_compiler_and_reftype_arc<ActionFn>(generate_actions: Arc<ActionFn>, parameter: CellRef, reference_type: ReferenceType) -> SyntaxCompiler 
    where ActionFn: 'static+Fn(CellRef) -> Result<CompiledActions, BindError>+Send+Sync {
        // Substitution means calling substitute_frame_refs and generating a new syntax with that parameter
        let actions_for_substitute      = Arc::clone(&generate_actions);
        let parameter_for_substitute    = parameter.clone();

        // Substitutes cell values in the parameter for a new cell value
        let substitute_frame_refs       = move |get_new_frame_ref: &mut dyn FnMut(FrameReference) -> Option<CellRef>| {
            // Substitute the frame references from our parameter
            let new_parameter       = substitute_frame_refs(parameter_for_substitute.clone(), get_new_frame_ref);
            let generate_actions    = actions_for_substitute.clone();

            // Create a new syntax compiler
            SyntaxCompiler::with_compiler_and_reftype_arc(generate_actions, new_parameter, reference_type)
        };

        SyntaxCompiler {
            generate_actions:       Box::new(move || generate_actions(parameter.clone())),
            substitute_frame_refs:  Box::new(substitute_frame_refs),
            reference_type:         reference_type
        }
    }
///
/// Creates a simple syntax compiler that generates actions from a cell
///
Creates a simple syntax compiler that generates actions from a cell
Creates a simple syntax compiler that generates actions from a cell
fn with_compiler_and_reftype_arc<ActionFn>(generate_actions: Arc<ActionFn>, parameter: CellRef, reference_type: ReferenceType) -> SyntaxCompiler 
    where ActionFn: 'static+Fn(CellRef) -> Result<CompiledActions, BindError>+Send+Sync {
        // Substitution means calling substitute_frame_refs and generating a new syntax with that parameter
        let actions_for_substitute      = Arc::clone(&generate_actions);
        let parameter_for_substitute    = parameter.clone();
        // Substitutes cell values in the parameter for a new cell value
        let substitute_frame_refs       = move |get_new_frame_ref: &mut dyn FnMut(FrameReference) -> Option<CellRef>| {
            // Substitute the frame references from our parameter
            let new_parameter       = substitute_frame_refs(parameter_for_substitute.clone(), get_new_frame_ref);
            let generate_actions    = actions_for_substitute.clone();
            // Create a new syntax compiler
            SyntaxCompiler::with_compiler_and_reftype_arc(generate_actions, new_parameter, reference_type)
        };
        SyntaxCompiler {
            generate_actions:       Box::new(move || generate_actions(parameter.clone())),
            substitute_frame_refs:  Box::new(substitute_frame_refs),
            reference_type:         reference_type
        }
    }
fn with_compiler_and_reftype_arc < ActionFn > ( generate_actions : Arc < ActionFn > , parameter : CellRef , reference_type : ReferenceType ) -> SyntaxCompiler where ActionFn : ' static + Fn ( CellRef ) -> Result < CompiledActions , BindError > + Send + Sync { // Substitution means calling substitute_frame_refs and generating a new syntax with that parameter let actions_for_substitute = Arc :: clone ( & generate_actions ) ; let parameter_for_substitute = parameter . clone ( ) ; // Substitutes cell values in the parameter for a new cell value let substitute_frame_refs = move | get_new_frame_ref : & mut dyn FnMut ( FrameReference ) -> Option < CellRef > | { // Substitute the frame references from our parameter let new_parameter = substitute_frame_refs ( parameter_for_substitute . clone ( ) , get_new_frame_ref ) ; let generate_actions = actions_for_substitute . clone ( ) ; // Create a new syntax compiler SyntaxCompiler :: with_compiler_and_reftype_arc ( generate_actions , new_parameter , reference_type ) } ; SyntaxCompiler { generate_actions : Box :: new ( move | | generate_actions ( parameter . clone ( ) ) ) , substitute_frame_refs : Box :: new ( substitute_frame_refs ) , reference_type : reference_type } }
Creates a simple syntax compiler that generates actions from a cell
Creates a simple syntax compiler that generates actions from a cell
generate_actions
Arc<ActionFn>
parameter
CellRef
reference_type
ReferenceType
generate_actions
Arc<ActionFn>
parameter
CellRef
reference_type
ReferenceType