Changes in src/Parser/DeclarationNode.cc [1395748:d180746]
- File:
-
- 1 edited
-
src/Parser/DeclarationNode.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/DeclarationNode.cc
r1395748 rd180746 333 333 DeclarationNode * DeclarationNode::newTypeDecl( string * name, DeclarationNode * typeParams ) { 334 334 DeclarationNode * newnode = new DeclarationNode; 335 newnode->name = name;336 335 newnode->type = new TypeData( TypeData::Symbolic ); 337 336 newnode->type->symbolic.isTypedef = false; 338 337 newnode->type->symbolic.params = typeParams; 338 newnode->type->symbolic.name = name; 339 339 return newnode; 340 340 } // DeclarationNode::newTypeDecl 341 341 342 DeclarationNode * DeclarationNode::newPointer( DeclarationNode * qualifiers , OperKinds kind) {343 DeclarationNode * newnode = new DeclarationNode; 344 newnode->type = new TypeData( kind == OperKinds::PointTo ? TypeData::Pointer : TypeData::Reference);342 DeclarationNode * DeclarationNode::newPointer( DeclarationNode * qualifiers ) { 343 DeclarationNode * newnode = new DeclarationNode; 344 newnode->type = new TypeData( TypeData::Pointer ); 345 345 if ( qualifiers ) { 346 346 return newnode->addQualifiers( qualifiers ); … … 759 759 DeclarationNode * DeclarationNode::addPointer( DeclarationNode * p ) { 760 760 if ( p ) { 761 assert( p->type->kind == TypeData::Pointer || TypeData::Reference);761 assert( p->type->kind == TypeData::Pointer ); 762 762 setBase( p->type ); 763 763 p->type = nullptr; … … 781 781 DeclarationNode * DeclarationNode::addNewPointer( DeclarationNode * p ) { 782 782 if ( p ) { 783 assert( p->type->kind == TypeData::Pointer || p->type->kind == TypeData::Reference);783 assert( p->type->kind == TypeData::Pointer ); 784 784 if ( type ) { 785 785 switch ( type->kind ) {
Note:
See TracChangeset
for help on using the changeset viewer.