Changes in src/Parser/DeclarationNode.cc [f196351:e6cee92]
- File:
-
- 1 edited
-
src/Parser/DeclarationNode.cc (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/DeclarationNode.cc
rf196351 re6cee92 10 10 // Created On : Sat May 16 12:34:05 2015 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Thr Aug 10 17:02:00 201713 // Update Count : 10 2112 // Last Modified On : Wed Jun 28 15:27:00 2017 13 // Update Count : 1019 14 14 // 15 15 … … 253 253 newnode->type->aggregate.fields = fields; 254 254 newnode->type->aggregate.body = body; 255 newnode->type->aggregate.tagged = false;256 newnode->type->aggregate.parent = nullptr;257 255 return newnode; 258 256 } // DeclarationNode::newAggregate … … 331 329 } // DeclarationNode::newTypeDecl 332 330 333 DeclarationNode * DeclarationNode::newPointer( DeclarationNode * qualifiers ) {334 DeclarationNode * newnode = new DeclarationNode; 335 newnode->type = new TypeData( TypeData::Pointer);331 DeclarationNode * DeclarationNode::newPointer( DeclarationNode * qualifiers, OperKinds kind ) { 332 DeclarationNode * newnode = new DeclarationNode; 333 newnode->type = new TypeData( kind == OperKinds::PointTo ? TypeData::Pointer : TypeData::Reference ); 336 334 if ( qualifiers ) { 337 335 return newnode->addQualifiers( qualifiers ); … … 750 748 DeclarationNode * DeclarationNode::addPointer( DeclarationNode * p ) { 751 749 if ( p ) { 752 assert( p->type->kind == TypeData::Pointer );750 assert( p->type->kind == TypeData::Pointer || TypeData::Reference ); 753 751 setBase( p->type ); 754 752 p->type = nullptr; … … 772 770 DeclarationNode * DeclarationNode::addNewPointer( DeclarationNode * p ) { 773 771 if ( p ) { 774 assert( p->type->kind == TypeData::Pointer );772 assert( p->type->kind == TypeData::Pointer || p->type->kind == TypeData::Reference ); 775 773 if ( type ) { 776 774 switch ( type->kind ) {
Note:
See TracChangeset
for help on using the changeset viewer.