Changeset 6803ff1 for src/Validate/ImplementEnumFunc.cpp
- Timestamp:
- Jun 25, 2024, 12:09:43 PM (18 months ago)
- Branches:
- master
- Children:
- d96d4f0
- Parents:
- f3b67b6 (diff), 5eb3f65 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
src/Validate/ImplementEnumFunc.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Validate/ImplementEnumFunc.cpp
rf3b67b6 r6803ff1 175 175 ast::FunctionDecl* EnumAttrFuncGenerator::genPosnProto() const { 176 176 return genProto( 177 "pos E",177 "posn", 178 178 {new ast::ObjectDecl(getLocation(), "_i", new ast::EnumInstType(decl))}, 179 179 {new ast::ObjectDecl(getLocation(), "_ret", … … 183 183 ast::FunctionDecl* EnumAttrFuncGenerator::genLabelProto() const { 184 184 return genProto( 185 "label E",185 "label", 186 186 {new ast::ObjectDecl(getLocation(), "_i", new ast::EnumInstType(decl))}, 187 187 {new ast::ObjectDecl( … … 193 193 if (decl->base) 194 194 return genProto( 195 "value E",195 "value", 196 196 {new ast::ObjectDecl(getLocation(), "_i", new ast::EnumInstType(decl))}, 197 197 {new ast::ObjectDecl(getLocation(), "_ret", … … 203 203 ast::FunctionDecl* EnumAttrFuncGenerator::genQuasiValueProto() const { 204 204 return genProto( 205 "value E",205 "value", 206 206 {new ast::ObjectDecl(getLocation(), "_i", new ast::EnumInstType(decl))}, 207 207 {new ast::ObjectDecl(getLocation(), "_ret", … … 254 254 auto param = params.front(); 255 255 ast::UntypedExpr* untyped = ast::UntypedExpr::createCall( 256 func->location, "pos E", { new ast::VariableExpr(func->location, param) });256 func->location, "posn", { new ast::VariableExpr(func->location, param) }); 257 257 func->stmts = new ast::CompoundStmt( 258 258 func->location, {new ast::ReturnStmt(func->location, untyped)}
Note:
See TracChangeset
for help on using the changeset viewer.