Changeset 7933351 for src/SynTree
- Timestamp:
- Dec 13, 2016, 4:59:46 PM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- ea83e00a
- Parents:
- fc638d2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Type.h
rfc638d2 r7933351 72 72 virtual unsigned size() const { return 1; }; 73 73 virtual bool isVoid() const { return size() == 0; } 74 virtual Type * getComponent( unsigned i ) { assertf( size() == 1 && i == 0, "Type::getComponent was called with size %d and index %d\n", size(), i ); return this; } 74 75 75 76 virtual Type *clone() const = 0; … … 372 373 iterator end() { return types.end(); } 373 374 375 virtual Type * getComponent( unsigned i ) { 376 assertf( i < size(), "TupleType::getComponent: index %d must be less than size %d", i, size() ); 377 return *(begin()+i); 378 } 379 374 380 virtual TupleType *clone() const { return new TupleType( *this ); } 375 381 virtual void accept( Visitor &v ) { v.visit( this ); }
Note: See TracChangeset
for help on using the changeset viewer.