Changes in src/Parser/DeclarationNode.cc [409433da:ce8c12f]
- File:
-
- 1 edited
-
src/Parser/DeclarationNode.cc (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/DeclarationNode.cc
r409433da rce8c12f 326 326 } // DeclarationNode::newTypeDecl 327 327 328 DeclarationNode * DeclarationNode::newPointer( DeclarationNode * qualifiers ) {329 DeclarationNode * newnode = new DeclarationNode; 330 newnode->type = new TypeData( TypeData::Pointer);328 DeclarationNode * DeclarationNode::newPointer( DeclarationNode * qualifiers, OperKinds kind ) { 329 DeclarationNode * newnode = new DeclarationNode; 330 newnode->type = new TypeData( kind == OperKinds::PointTo ? TypeData::Pointer : TypeData::Reference ); 331 331 if ( qualifiers ) { 332 332 return newnode->addQualifiers( qualifiers ); … … 745 745 DeclarationNode * DeclarationNode::addPointer( DeclarationNode * p ) { 746 746 if ( p ) { 747 assert( p->type->kind == TypeData::Pointer );747 assert( p->type->kind == TypeData::Pointer || TypeData::Reference ); 748 748 setBase( p->type ); 749 749 p->type = nullptr;
Note:
See TracChangeset
for help on using the changeset viewer.