Changeset ed3935da
- Timestamp:
- May 22, 2019, 3:16:52 PM (6 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 09ab71a
- Parents:
- 3f840e3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Decl.hpp
r3f840e3 red3935da 232 232 AggregateDecl* set_body( bool b ) { body = b; return this; } 233 233 234 private:235 AggregateDecl * clone() const override = 0;236 MUTATE_FRIEND237 238 protected:239 234 /// Produces a name for the kind of aggregate 240 235 virtual std::string typeString() const = 0; 236 237 private: 238 AggregateDecl * clone() const override = 0; 239 MUTATE_FRIEND 241 240 }; 242 241 … … 256 255 257 256 const Decl * accept( Visitor & v ) const override { return v.visit( this ); } 257 258 std::string typeString() const override { return "struct"; } 259 258 260 private: 259 261 StructDecl * clone() const override { return new StructDecl{ *this }; } 260 262 MUTATE_FRIEND 261 262 std::string typeString() const override { return "struct"; }263 263 }; 264 264 … … 271 271 272 272 const Decl * accept( Visitor& v ) const override { return v.visit( this ); } 273 274 std::string typeString() const override { return "union"; } 275 273 276 private: 274 277 UnionDecl * clone() const override { return new UnionDecl{ *this }; } 275 278 MUTATE_FRIEND 276 277 std::string typeString() const override { return "union"; }278 279 }; 279 280 … … 289 290 290 291 const Decl * accept( Visitor & v ) const override { return v.visit( this ); } 292 293 std::string typeString() const override { return "enum"; } 294 291 295 private: 292 296 EnumDecl * clone() const override { return new EnumDecl{ *this }; } 293 297 MUTATE_FRIEND 294 295 std::string typeString() const override { return "enum"; }296 298 297 299 /// Map from names to enumerator values; kept private for lazy initialization … … 307 309 308 310 const Decl * accept( Visitor & v ) const override { return v.visit( this ); } 311 312 std::string typeString() const override { return "trait"; } 313 309 314 private: 310 315 TraitDecl * clone() const override { return new TraitDecl{ *this }; } 311 316 MUTATE_FRIEND 312 313 std::string typeString() const override { return "trait"; }314 317 }; 315 318
Note: See TracChangeset
for help on using the changeset viewer.