Changes in src/SynTree/Declaration.h [0e73845:f0ecf9b]
- File:
-
- 1 edited
-
src/SynTree/Declaration.h (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Declaration.h
r0e73845 rf0ecf9b 84 84 Expression *asmName; 85 85 std::list< Attribute * > attributes; 86 bool isDeleted = false;87 86 88 87 DeclarationWithType( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage, const std::list< Attribute * > & attributes, Type::FuncSpecifiers fs ); … … 152 151 FunctionType *type; 153 152 CompoundStmt *statements; 154 std::list< Expression * > withExprs;155 153 156 154 FunctionDecl( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage, FunctionType *type, CompoundStmt *statements, … … 202 200 typedef NamedTypeDecl Parent; 203 201 public: 204 enum Kind { Dtype, Ftype, Ttype , NUMBER_OF_KINDS};202 enum Kind { Dtype, Ftype, Ttype }; 205 203 206 204 Type * init; … … 246 244 typedef NamedTypeDecl Parent; 247 245 public: 248 TypedefDecl( const std::string &name, CodeLocation location, Type::StorageClasses scs, Type *type, LinkageSpec::Spec spec = LinkageSpec::Cforall ) 249 : Parent( name, scs, type ) { set_linkage( spec ); this->location = location; } 250 246 TypedefDecl( const std::string &name, Type::StorageClasses scs, Type *type, LinkageSpec::Spec spec = LinkageSpec::Cforall ) : Parent( name, scs, type ) { set_linkage( spec ); } 251 247 TypedefDecl( const TypedefDecl &other ) : Parent( other ) {} 252 248 … … 266 262 bool body; 267 263 std::list< Attribute * > attributes; 268 AggregateDecl * parent = nullptr;269 264 270 265 AggregateDecl( const std::string &name, const std::list< Attribute * > & attributes = std::list< class Attribute * >(), LinkageSpec::Spec linkage = LinkageSpec::Cforall ); … … 324 319 EnumDecl( const EnumDecl &other ) : Parent( other ) {} 325 320 326 bool valueOf( Declaration * enumerator, long long int & value );327 328 321 virtual EnumDecl *clone() const override { return new EnumDecl( *this ); } 329 322 virtual void accept( Visitor &v ) override { v.visit( this ); } 330 323 virtual Declaration *acceptMutator( Mutator &m ) override { return m.mutate( this ); } 331 324 private: 332 std::map< std::string, long long int > enumValues;333 325 virtual std::string typeString() const override; 334 326 }; … … 363 355 virtual void accept( Visitor &v ) override { v.visit( this ); } 364 356 virtual AsmDecl *acceptMutator( Mutator &m ) override { return m.mutate( this ); } 365 virtual void print( std::ostream &os, Indenter indent = {} ) const override;366 virtual void printShort( std::ostream &os, Indenter indent = {} ) const override;367 };368 369 class StaticAssertDecl : public Declaration {370 public:371 Expression * condition;372 ConstantExpr * message; // string literal373 374 StaticAssertDecl( Expression * condition, ConstantExpr * message );375 StaticAssertDecl( const StaticAssertDecl & other );376 virtual ~StaticAssertDecl();377 378 virtual StaticAssertDecl * clone() const override { return new StaticAssertDecl( *this ); }379 virtual void accept( Visitor &v ) override { v.visit( this ); }380 virtual StaticAssertDecl * acceptMutator( Mutator &m ) override { return m.mutate( this ); }381 357 virtual void print( std::ostream &os, Indenter indent = {} ) const override; 382 358 virtual void printShort( std::ostream &os, Indenter indent = {} ) const override;
Note:
See TracChangeset
for help on using the changeset viewer.