Changes in src/AST/Decl.hpp [ed3935da:112fe04]
- File:
-
- 1 edited
-
src/AST/Decl.hpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Decl.hpp
red3935da r112fe04 232 232 AggregateDecl* set_body( bool b ) { body = b; return this; } 233 233 234 private: 235 AggregateDecl * clone() const override = 0; 236 MUTATE_FRIEND 237 238 protected: 234 239 /// Produces a name for the kind of aggregate 235 240 virtual std::string typeString() const = 0; 236 237 private:238 AggregateDecl * clone() const override = 0;239 MUTATE_FRIEND240 241 }; 241 242 … … 255 256 256 257 const Decl * accept( Visitor & v ) const override { return v.visit( this ); } 258 private: 259 StructDecl * clone() const override { return new StructDecl{ *this }; } 260 MUTATE_FRIEND 257 261 258 262 std::string typeString() const override { return "struct"; } 259 260 private:261 StructDecl * clone() const override { return new StructDecl{ *this }; }262 MUTATE_FRIEND263 263 }; 264 264 … … 271 271 272 272 const Decl * accept( Visitor& v ) const override { return v.visit( this ); } 273 private: 274 UnionDecl * clone() const override { return new UnionDecl{ *this }; } 275 MUTATE_FRIEND 273 276 274 277 std::string typeString() const override { return "union"; } 275 276 private:277 UnionDecl * clone() const override { return new UnionDecl{ *this }; }278 MUTATE_FRIEND279 278 }; 280 279 … … 290 289 291 290 const Decl * accept( Visitor & v ) const override { return v.visit( this ); } 291 private: 292 EnumDecl * clone() const override { return new EnumDecl{ *this }; } 293 MUTATE_FRIEND 292 294 293 295 std::string typeString() const override { return "enum"; } 294 295 private:296 EnumDecl * clone() const override { return new EnumDecl{ *this }; }297 MUTATE_FRIEND298 296 299 297 /// Map from names to enumerator values; kept private for lazy initialization … … 309 307 310 308 const Decl * accept( Visitor & v ) const override { return v.visit( this ); } 309 private: 310 TraitDecl * clone() const override { return new TraitDecl{ *this }; } 311 MUTATE_FRIEND 311 312 312 313 std::string typeString() const override { return "trait"; } 313 314 private:315 TraitDecl * clone() const override { return new TraitDecl{ *this }; }316 MUTATE_FRIEND317 314 }; 318 315
Note:
See TracChangeset
for help on using the changeset viewer.