pub(crate) fn resolve_condition(
    condition: &pt::YulExpression,
    context: &ExprContext,
    symtable: &mut Symtable,
    function_table: &mut FunctionsTable,
    ns: &mut Namespace,
) -> Result<YulExpression, ()> {
    let resolved_condition =
        resolve_yul_expression(condition, context, symtable, function_table, ns)?;
    if let Err(diagnostic) = verify_type_from_expression(&resolved_condition, function_table) {
        ns.diagnostics.push(diagnostic);
        return Err(());
    } else if let Some(diagnostic) = check_type(&resolved_condition, context, ns, symtable) {
        ns.diagnostics.push(diagnostic);
        return Err(());
    }

    Ok(resolved_condition)
}
/// Resolves condition statements for either if-statement and switch-statements
Resolves condition statements for either if-statement and switch-statements
Resolves condition statements for either if - statement and switch - statements
pub(crate) fn resolve_condition(
    condition: &pt::YulExpression,
    context: &ExprContext,
    symtable: &mut Symtable,
    function_table: &mut FunctionsTable,
    ns: &mut Namespace,
) -> Result<YulExpression, ()> {
    let resolved_condition =
        resolve_yul_expression(condition, context, symtable, function_table, ns)?;
    if let Err(diagnostic) = verify_type_from_expression(&resolved_condition, function_table) {
        ns.diagnostics.push(diagnostic);
        return Err(());
    } else if let Some(diagnostic) = check_type(&resolved_condition, context, ns, symtable) {
        ns.diagnostics.push(diagnostic);
        return Err(());
    }
    Ok(resolved_condition)
}
pub ( crate ) fn resolve_condition ( condition : & pt :: YulExpression , context : & ExprContext , symtable : & mut Symtable , function_table : & mut FunctionsTable , ns : & mut Namespace , ) -> Result < YulExpression , ( ) > { let resolved_condition = resolve_yul_expression ( condition , context , symtable , function_table , ns ) ? ; if let Err ( diagnostic ) = verify_type_from_expression ( & resolved_condition , function_table ) { ns . diagnostics . push ( diagnostic ) ; return Err ( ( ) ) ; } else if let Some ( diagnostic ) = check_type ( & resolved_condition , context , ns , symtable ) { ns . diagnostics . push ( diagnostic ) ; return Err ( ( ) ) ; } Ok ( resolved_condition ) }
Resolves condition statements for either if-statement and switch-statements
Resolves condition statements for either if - statement and switch - statements
condition
&pt::YulExpression
context
&ExprContext
symtable
&mut Symtable
function_table
&mut FunctionsTable
ns
&mut Namespace
condition
&pt::YulExpression
context
&ExprContext
symtable
&mut Symtable
function_table
&mut FunctionsTable
ns
&mut Namespace