Changeset 93c10de for src/AST/Decl.hpp
- Timestamp:
- Nov 24, 2022, 11:01:37 AM (19 months ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- 82a90d4
- Parents:
- 78de1e5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Decl.hpp
r78de1e5 r93c10de 10 10 // Created On : Thu May 9 10:00:00 2019 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Thu May 5 12:09:00 202213 // Update Count : 3 312 // Last Modified On : Thu Nov 24 9:44:00 2022 13 // Update Count : 34 14 14 // 15 15 … … 191 191 ptr<Type> init; 192 192 193 /// Data extracted from a type decl194 struct Data {195 Kind kind;196 bool isComplete;197 198 Data() : kind( NUMBER_OF_KINDS ), isComplete( false ) {}199 Data( const TypeDecl * d ) : kind( d->kind ), isComplete( d->sized ) {}200 Data( Kind k, bool c ) : kind( k ), isComplete( c ) {}201 Data( const Data & d1, const Data & d2 )202 : kind( d1.kind ), isComplete( d1.isComplete || d2.isComplete ) {}203 204 bool operator==( const Data & o ) const { return kind == o.kind && isComplete == o.isComplete; }205 bool operator!=( const Data & o ) const { return !(*this == o); }206 };207 208 193 TypeDecl( 209 194 const CodeLocation & loc, const std::string & name, Storage::Classes storage, … … 225 210 }; 226 211 227 std::ostream & operator<< ( std::ostream &, const TypeDecl::Data & ); 212 /// Data extracted from a TypeDecl. 213 struct TypeData { 214 TypeDecl::Kind kind; 215 bool isComplete; 216 217 TypeData() : kind( TypeDecl::NUMBER_OF_KINDS ), isComplete( false ) {} 218 TypeData( const TypeDecl * d ) : kind( d->kind ), isComplete( d->sized ) {} 219 TypeData( TypeDecl::Kind k, bool c ) : kind( k ), isComplete( c ) {} 220 TypeData( const TypeData & d1, const TypeData & d2 ) 221 : kind( d1.kind ), isComplete( d1.isComplete || d2.isComplete ) {} 222 223 bool operator==( const TypeData & o ) const { return kind == o.kind && isComplete == o.isComplete; } 224 bool operator!=( const TypeData & o ) const { return !(*this == o); } 225 }; 226 227 std::ostream & operator<< ( std::ostream &, const TypeData & ); 228 228 229 229 /// C-style typedef `typedef Foo Bar`
Note: See TracChangeset
for help on using the changeset viewer.