Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/DeclarationNode.cc

    r409433da rce8c12f  
    326326} // DeclarationNode::newTypeDecl
    327327
    328 DeclarationNode * DeclarationNode::newPointer( DeclarationNode * qualifiers ) {
    329         DeclarationNode * newnode = new DeclarationNode;
    330         newnode->type = new TypeData( TypeData::Pointer );
     328DeclarationNode * DeclarationNode::newPointer( DeclarationNode * qualifiers, OperKinds kind ) {
     329        DeclarationNode * newnode = new DeclarationNode;
     330        newnode->type = new TypeData( kind == OperKinds::PointTo ? TypeData::Pointer : TypeData::Reference );
    331331        if ( qualifiers ) {
    332332                return newnode->addQualifiers( qualifiers );
     
    745745DeclarationNode * DeclarationNode::addPointer( DeclarationNode * p ) {
    746746        if ( p ) {
    747                 assert( p->type->kind == TypeData::Pointer );
     747                assert( p->type->kind == TypeData::Pointer || TypeData::Reference );
    748748                setBase( p->type );
    749749                p->type = nullptr;
Note: See TracChangeset for help on using the changeset viewer.