fn process_parameters(parameters: &[pt::YulTypedIdentifier], ns: &mut Namespace) -> Vec<Parameter> {
    let mut params: Vec<Parameter> = Vec::with_capacity(parameters.len());
    for item in parameters {
        let ty = match &item.ty {
            Some(identifier) => {
                if let Some(solang_type) = get_type_from_string(&identifier.name) {
                    solang_type
                } else {
                    ns.diagnostics.push(Diagnostic::error(
                        identifier.loc,
                        format!("unrecognized yul type: {}", identifier.name),
                    ));

                    Type::Uint(256)
                }
            }
            None => Type::Uint(256),
        };

        params.push(Parameter {
            loc: item.loc,
            ty,
            ty_loc: item.ty.as_ref().map(|ty_id| ty_id.loc),
            indexed: false,
            id: Some(item.id.clone()),
            readonly: false,
        });
    }

    params
}
/// Resolve the parameters of a function declaration
Resolve the parameters of a function declaration
Resolve the parameters of a function declaration
fn process_parameters(parameters: &[pt::YulTypedIdentifier], ns: &mut Namespace) -> Vec<Parameter> {
    let mut params: Vec<Parameter> = Vec::with_capacity(parameters.len());
    for item in parameters {
        let ty = match &item.ty {
            Some(identifier) => {
                if let Some(solang_type) = get_type_from_string(&identifier.name) {
                    solang_type
                } else {
                    ns.diagnostics.push(Diagnostic::error(
                        identifier.loc,
                        format!("unrecognized yul type: {}", identifier.name),
                    ));
                    Type::Uint(256)
                }
            }
            None => Type::Uint(256),
        };
        params.push(Parameter {
            loc: item.loc,
            ty,
            ty_loc: item.ty.as_ref().map(|ty_id| ty_id.loc),
            indexed: false,
            id: Some(item.id.clone()),
            readonly: false,
        });
    }
    params
}
fn process_parameters ( parameters : & [ pt :: YulTypedIdentifier ] , ns : & mut Namespace ) -> Vec < Parameter > { let mut params : Vec < Parameter > = Vec :: with_capacity ( parameters . len ( ) ) ; for item in parameters { let ty = match & item . ty { Some ( identifier ) => { if let Some ( solang_type ) = get_type_from_string ( & identifier . name ) { solang_type } else { ns . diagnostics . push ( Diagnostic :: error ( identifier . loc , format ! ( " " identifier name ) , ) ) ; Type :: Uint ( 256 ) } } None => Type :: Uint ( 256 ) , } ; params . push ( Parameter { loc : item . loc , ty , ty_loc : item . ty . as_ref ( ) . map ( | ty_id | ty_id . loc ) , indexed : false , id : Some ( item . id . clone ( ) ) , readonly : false , } ) ; } params }
Resolve the parameters of a function declaration
Resolve the parameters of a function declaration
parameters
&[pt::YulTypedIdentifier]
ns
&mut Namespace
parameters
&[pt::YulTypedIdentifier]
ns
&mut Namespace