/// Function call do not change state analyzer but use it
Function call do not change state analyzer but use it
Function call do not change state analyzer but use it
pub fn function_call(
        &mut self,
        data: &ast::FunctionCall<'a>,
        body_state: &BodyState<'a>,
    ) -> Vec<StateResult> {
        let res = if body_state.functions.contains_key(&data.name())
            || self.global.functions.contains_key(&data.name())
        {
            vec![]
        } else {
            vec![StateResult::FunctionNotFound]
        };
        data.parameters.iter().fold(res, |mut s, e| {
            let mut res_expr = self.expression(e, body_state.clone());
            s.append(&mut res_expr);
            s
        })
    }
pub fn function_call ( & mut self , data : & ast :: FunctionCall < ' a > , body_state : & BodyState < ' a > , ) -> Vec < StateResult > { let res = if body_state . functions . contains_key ( & data . name ( ) ) || self . global . functions . contains_key ( & data . name ( ) ) { vec ! [ ] } else { vec ! [ StateResult FunctionNotFound ] } ; data . parameters . iter ( ) . fold ( res , | mut s , e | { let mut res_expr = self . expression ( e , body_state . clone ( ) ) ; s . append ( & mut res_expr ) ; s } ) }
Function call do not change state analyzer but use it
Function call do not change state analyzer but use it
&mut self
data
&ast::FunctionCall<'a>
body_state
&BodyState<'a>