Ignore:
Timestamp:
May 7, 2024, 7:04:17 PM (5 months ago)
Author:
JiadaL <j82liang@…>
Branches:
master
Children:
0b6c1c9
Parents:
164a6b6
Message:

Remove intermeidate type (enum attribute type); remove replacePseudoFunc (has been migrated to resolver)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/ResolvExpr/CandidateFinder.cpp

    r164a6b6 rc333ed2  
    21382138}
    21392139
    2140 // get the valueE(...) ApplicationExpr that returns the enum value
    2141 const ast::Expr * getValueEnumCall(
    2142         const ast::Expr * expr,
    2143         const ResolvExpr::ResolveContext & context, const ast::TypeEnvironment & env ) {
    2144                 auto callExpr = new ast::UntypedExpr(
    2145                         expr->location, new ast::NameExpr( expr->location, "valueE"), {expr} );
    2146                 CandidateFinder finder( context, env );
    2147                 finder.find( callExpr );
    2148                 CandidateList winners = findMinCost( finder.candidates );
    2149                 if (winners.size() != 1) {
    2150                         SemanticError( callExpr, "Ambiguous expression in valueE..." );
    2151                 }
    2152                 CandidateRef & choice = winners.front();
    2153                 return choice->expr;
    2154 }
    2155 
    21562140const ast::Expr * createCondExpr( const ast::Expr * expr ) {
    21572141        assert( expr );
Note: See TracChangeset for help on using the changeset viewer.