pub fn new_fun(
    loc: Loc,
    name: FunctionName,
    attributes: Attributes,
    visibility: Visibility,
    signature: FunctionSignature,
    def: Exp,
) -> Function {
    Function {
        attributes: vec![attributes],
        loc,
        visibility,
        signature,
        acquires: vec![],
        name,
        body: sp(
            loc,
            FunctionBody_::Defined((vec![], vec![], None, Box::new(Some(def)))),
        ),
    }
}
/// Helper to create a new function declaration.
Helper to create a new function declaration.
Helper to create a new function declaration .
pub fn new_fun(
    loc: Loc,
    name: FunctionName,
    attributes: Attributes,
    visibility: Visibility,
    signature: FunctionSignature,
    def: Exp,
) -> Function {
    Function {
        attributes: vec![attributes],
        loc,
        visibility,
        signature,
        acquires: vec![],
        name,
        body: sp(
            loc,
            FunctionBody_::Defined((vec![], vec![], None, Box::new(Some(def)))),
        ),
    }
}
pub fn new_fun ( loc : Loc , name : FunctionName , attributes : Attributes , visibility : Visibility , signature : FunctionSignature , def : Exp , ) -> Function { Function { attributes : vec ! [ attributes ] , loc , visibility , signature , acquires : vec ! [ ] , name , body : sp ( loc , FunctionBody_ :: Defined ( ( vec ! [ ] , vec ! [ ] , None , Box :: new ( Some ( def ) ) ) ) , ) , } }
Helper to create a new function declaration.
Helper to create a new function declaration .
loc
Loc
name
FunctionName
attributes
Attributes
visibility
Visibility
signature
FunctionSignature
def
Exp