Changeset 28f8f15 for src/AST/Decl.hpp
- Timestamp:
- Apr 27, 2023, 3:13:24 PM (3 years ago)
- Branches:
- ADT
- Children:
- 561354f
- Parents:
- b110bcc
- File:
-
- 1 edited
-
src/AST/Decl.hpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Decl.hpp
rb110bcc r28f8f15 248 248 class AggregateDecl : public Decl { 249 249 public: 250 enum Aggregate { Struct, Union, Enum, Exception, Trait, Generator, Coroutine, Monitor, Thread, NoAggregate };250 enum Aggregate { Struct, Union, Enum, Exception, Trait, Generator, Coroutine, Monitor, Thread, NoAggregate, ADT }; 251 251 static const char * aggrString( Aggregate aggr ); 252 252 … … 286 286 bool is_monitor () const { return kind == Monitor ; } 287 287 bool is_thread () const { return kind == Thread ; } 288 bool is_adt () const { return kind == ADT ; } 288 289 289 290 const Decl * accept( Visitor & v ) const override { return v.visit( this ); } … … 320 321 enum class EnumHiding { Visible, Hide } hide; 321 322 323 std::vector<ptr<StructDecl>> data_constructors; 324 bool isData = false; 325 ptr<UnionDecl> data_union; 326 ptr<EnumDecl> tag; 327 ptr<StructDecl> tag_union; 328 322 329 EnumDecl( const CodeLocation& loc, const std::string& name, bool isTyped = false, 323 330 std::vector<ptr<Attribute>>&& attrs = {}, Linkage::Spec linkage = Linkage::Cforall, 324 Type const * base = nullptr, EnumHiding hide = EnumHiding:: Hide,331 Type const * base = nullptr, EnumHiding hide = EnumHiding::Visible, 325 332 std::unordered_map< std::string, long long > enumValues = std::unordered_map< std::string, long long >() ) 326 333 : AggregateDecl( loc, name, std::move(attrs), linkage ), isTyped(isTyped), base(base), hide(hide), enumValues(enumValues) {}
Note:
See TracChangeset
for help on using the changeset viewer.