Changeset 367725d for src/Validate
- Timestamp:
- Jan 22, 2024, 3:23:12 AM (8 months ago)
- Branches:
- master
- Children:
- 544deb9
- Parents:
- ac939461
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Validate/ReplacePseudoFunc.cpp
rac939461 r367725d 17 17 ast::Expr const * ReplacePseudoFuncCore::postvisit( ast::ApplicationExpr const * expr) { 18 18 auto fname = ast::getFunctionName( expr ); 19 if ( fname == "posE" ) {19 if ( fname == "posE" || fname == "valueE" || fname == "labelE" ) { 20 20 // std::cerr << "Found App in ReplacePseudoFunc" << std::endl; 21 21 if ( expr->args.size() != 1 ) { … … 35 35 for ( size_t i = 0; i < base->members.size(); i++ ) { 36 36 if ( base->members[i]->name == referredName ) { 37 return ast::ConstantExpr::from_int( expr->location, i ); 37 if ( fname == "posE ") 38 return ast::ConstantExpr::from_int( expr->location, i ); 39 else if (fname == "labelE" ) 40 return ast::ConstantExpr::from_string( expr->location, referredName ); 41 else 42 return new ast::TypeExpr( expr->location, argType ); 38 43 } 39 44 }
Note: See TracChangeset
for help on using the changeset viewer.