Changeset 29702ad for src/AST/Decl.hpp
- Timestamp:
- Nov 22, 2022, 10:18:04 AM (3 years ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- 20cf96d
- Parents:
- 1553a55 (diff), d41735a (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
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Decl.hpp
r1553a55 r29702ad 315 315 // enum (type_optional) Name {...} 316 316 ptr<Type> base; // if isTyped == true && base.get() == nullptr, it is a "void" type enum 317 318 EnumDecl( const CodeLocation& loc, const std::string& name, bool isTyped = false, 317 enum class EnumHiding { Visible, Hide } hide; 318 319 EnumDecl( const CodeLocation& loc, const std::string& name, bool isTyped = false, 319 320 std::vector<ptr<Attribute>>&& attrs = {}, Linkage::Spec linkage = Linkage::Cforall, 320 Type const * base = nullptr, 321 Type const * base = nullptr, EnumHiding hide = EnumHiding::Hide, 321 322 std::unordered_map< std::string, long long > enumValues = std::unordered_map< std::string, long long >() ) 322 : AggregateDecl( loc, name, std::move(attrs), linkage ), isTyped(isTyped), base(base), enumValues(enumValues) {}323 : AggregateDecl( loc, name, std::move(attrs), linkage ), isTyped(isTyped), base(base), hide(hide), enumValues(enumValues) {} 323 324 324 325 /// gets the integer value for this enumerator, returning true iff value found … … 397 398 }; 398 399 400 /// Static Assertion `_Static_assert( ... , ... );` 399 401 class StaticAssertDecl : public Decl { 400 402 public: … … 411 413 }; 412 414 413 class InlineValueDecl final : public DeclWithType { 415 /// Inline Member Declaration `inline TypeName;` 416 class InlineMemberDecl final : public DeclWithType { 414 417 public: 415 418 ptr<Type> type; 416 419 417 Inline ValueDecl( const CodeLocation & loc, const std::string & name, const Type * type,420 InlineMemberDecl( const CodeLocation & loc, const std::string & name, const Type * type, 418 421 Storage::Classes storage = {}, Linkage::Spec linkage = Linkage::Cforall, 419 422 std::vector< ptr<Attribute> > && attrs = {}, Function::Specs fs = {} ) … … 425 428 const DeclWithType * accept( Visitor& v ) const override { return v.visit( this ); } 426 429 private: 427 InlineValueDecl * clone() const override { return new InlineValueDecl{ *this }; } 428 MUTATE_FRIEND 429 }; 430 InlineMemberDecl * clone() const override { return new InlineMemberDecl{ *this }; } 431 MUTATE_FRIEND 432 }; 433 430 434 } 431 435
Note:
See TracChangeset
for help on using the changeset viewer.