pub fn fn_body(
        &mut self,
        ast: &FunctionBody,
    ) -> (VecInstructionSet, Option<Type>, Option<String>) {
        #[cfg(feature = "fn_body")]
        println!("\t#[call] fn_body: FunctionBody");
        let mut entry_ctx = Context::new();
        //let src = entry!(entry_ctx.get());
        let mut last_body_type: Option<Type> = None;
        let mut last_body_value: Option<String> = None;
        let body_instr: VecInstructionSet = ast.iter().fold(vec![], |v, b| {
            let (ctx, mut statement) = self.fn_body_statement(&entry_ctx, b);
            entry_ctx = ctx;
            for i in (0..statement.len()).rev() {
                if let Some(ty) = statement[i].get_type() {
                    last_body_type = Some(ty);
                    last_body_value = statement[i].get_value();
                }
            }
            let mut v = v;
            v.append(&mut statement);
            v
        });
        #[cfg(feature = "fn_body")]
        println!("\t#[fn_body] fn_body: {:#?} \n\t#[end_fn_body]", body_instr);
        (body_instr, last_body_type, last_body_value)
    }
/// Body of any kind expression.
/// Return: Instructions, last Type, last Value
Body of any kind expression.
Return: Instructions, last Type, last Value
Body of any kind expression . Return : Instructions last Type last Value
pub fn fn_body(
        &mut self,
        ast: &FunctionBody,
    ) -> (VecInstructionSet, Option<Type>, Option<String>) {
        #[cfg(feature = "fn_body")]
        println!("\t#[call] fn_body: FunctionBody");
        let mut entry_ctx = Context::new();
        //let src = entry!(entry_ctx.get());
        let mut last_body_type: Option<Type> = None;
        let mut last_body_value: Option<String> = None;
        let body_instr: VecInstructionSet = ast.iter().fold(vec![], |v, b| {
            let (ctx, mut statement) = self.fn_body_statement(&entry_ctx, b);
            entry_ctx = ctx;
            for i in (0..statement.len()).rev() {
                if let Some(ty) = statement[i].get_type() {
                    last_body_type = Some(ty);
                    last_body_value = statement[i].get_value();
                }
            }
            let mut v = v;
            v.append(&mut statement);
            v
        });
        #[cfg(feature = "fn_body")]
        println!("\t#[fn_body] fn_body: {:#?} \n\t#[end_fn_body]", body_instr);
        (body_instr, last_body_type, last_body_value)
    }
pub fn fn_body ( & mut self , ast : & FunctionBody , ) -> ( VecInstructionSet , Option < Type > , Option < String > ) { # [ cfg ( feature " " ) ] println ! ( " \t " ) ; let mut entry_ctx = Context :: new ( ) ; //let src = entry!(entry_ctx.get()); let mut last_body_type : Option < Type > = None ; let mut last_body_value : Option < String > = None ; let body_instr : VecInstructionSet = ast . iter ( ) . fold ( vec ! [ ] , | v , b | { let ( ctx , mut statement ) = self . fn_body_statement ( & entry_ctx , b ) ; entry_ctx = ctx ; for i in ( 0 .. statement . len ( ) ) . rev ( ) { if let Some ( ty ) = statement [ i ] . get_type ( ) { last_body_type = Some ( ty ) ; last_body_value = statement [ i ] . get_value ( ) ; } } let mut v = v ; v . append ( & mut statement ) ; v } ) ; # [ cfg ( feature " " ) ] println ! ( " \t \n \t " body_instr ) ; ( body_instr , last_body_type , last_body_value ) }
Body of any kind expression.
Body of any kind expression .
&mut self
ast
&FunctionBody