fn make_path_expr(&mut self, oper: Operation, node_id: NodeId, cond: Exp, exp: Exp) -> Exp {
        let path_cond_loc = self.loc_map.get(&node_id).expect("loc defined").clone();
        let new_node_id = self.new_node_id_with_type_loc(&BOOL_TYPE, &path_cond_loc);
        match exp {
            Exp::Call(outer_node_id, Operation::CondWithAbortCode, mut args) => {
                let exp = args.remove(0);
                let code = args.remove(0);
                Exp::Call(
                    outer_node_id,
                    Operation::CondWithAbortCode,
                    vec![Exp::Call(new_node_id, oper, vec![cond, exp]), code],
                )
            }
            Exp::Call(_, Operation::AbortCodes, _) => {
                self.parent.error(&path_cond_loc, "[implementation restriction] `aborts_with` cannot be included in schema expression context");
                exp
            }
            _ => Exp::Call(new_node_id, oper, vec![cond, exp]),
        }
    }
/// Make a path expression. This takes care of keeping virtual operators as top-level
/// expressions.
Make a path expression. This takes care of keeping virtual operators as top-level
expressions.
Make a path expression . This takes care of keeping virtual operators as top - level expressions .
fn make_path_expr(&mut self, oper: Operation, node_id: NodeId, cond: Exp, exp: Exp) -> Exp {
        let path_cond_loc = self.loc_map.get(&node_id).expect("loc defined").clone();
        let new_node_id = self.new_node_id_with_type_loc(&BOOL_TYPE, &path_cond_loc);
        match exp {
            Exp::Call(outer_node_id, Operation::CondWithAbortCode, mut args) => {
                let exp = args.remove(0);
                let code = args.remove(0);
                Exp::Call(
                    outer_node_id,
                    Operation::CondWithAbortCode,
                    vec![Exp::Call(new_node_id, oper, vec![cond, exp]), code],
                )
            }
            Exp::Call(_, Operation::AbortCodes, _) => {
                self.parent.error(&path_cond_loc, "[implementation restriction] `aborts_with` cannot be included in schema expression context");
                exp
            }
            _ => Exp::Call(new_node_id, oper, vec![cond, exp]),
        }
    }
fn make_path_expr ( & mut self , oper : Operation , node_id : NodeId , cond : Exp , exp : Exp ) -> Exp { let path_cond_loc = self . loc_map . get ( & node_id ) . expect ( " " ) . clone ( ) ; let new_node_id = self . new_node_id_with_type_loc ( & BOOL_TYPE , & path_cond_loc ) ; match exp { Exp :: Call ( outer_node_id , Operation :: CondWithAbortCode , mut args ) => { let exp = args . remove ( 0 ) ; let code = args . remove ( 0 ) ; Exp :: Call ( outer_node_id , Operation :: CondWithAbortCode , vec ! [ Exp Call ( new_node_id oper vec [ cond exp ] ) code ] , ) } Exp :: Call ( _ , Operation :: AbortCodes , _ ) => { self . parent . error ( & path_cond_loc , " " ) ; exp } _ => Exp :: Call ( new_node_id , oper , vec ! [ cond exp ] ) , } }
Make a path expression.
Make a path expression .
&mut self
oper
Operation
node_id
NodeId
cond
Exp
exp
Exp
&mut self
oper
Operation
node_id
NodeId
cond
Exp
exp
Exp