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