Changeset 9a533ba for src


Ignore:
Timestamp:
Feb 21, 2023, 3:39:17 PM (14 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
ADT, ast-experimental, master
Children:
640b3df
Parents:
40747247
Message:

Remove the unused DeclarationNode::Attr_t type and support.

Location:
src/Parser
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/DeclarationNode.cc

    r40747247 r9a533ba  
    6161        variable.initializer = nullptr;
    6262
    63 //      attr.name = nullptr;
    64         attr.expr = nullptr;
    65         attr.type = nullptr;
    66 
    6763        assert.condition = nullptr;
    6864        assert.message = nullptr;
     
    7066
    7167DeclarationNode::~DeclarationNode() {
    72 //      delete attr.name;
    73         delete attr.expr;
    74         delete attr.type;
    75 
    7668//      delete variable.name;
    7769        delete variable.assertions;
     
    114106        newnode->variable.assertions = maybeClone( variable.assertions );
    115107        newnode->variable.initializer = maybeClone( variable.initializer );
    116 
    117 //      newnode->attr.name = attr.name ? new string( *attr.name ) : nullptr;
    118         newnode->attr.expr = maybeClone( attr.expr );
    119         newnode->attr.type = maybeClone( attr.type );
    120108
    121109        newnode->assert.condition = maybeClone( assert.condition );
     
    12131201        assert( type );
    12141202
    1215         if ( attr.expr ) {
    1216                 return new AttrType( buildQualifiers( type ), *name, attr.expr->build(), attributes );
    1217         } else if ( attr.type ) {
    1218                 return new AttrType( buildQualifiers( type ), *name, attr.type->buildType(), attributes );
    1219         } // if
    1220 
    12211203        switch ( type->kind ) {
    12221204          case TypeData::Enum:
  • src/Parser/ParseNode.h

    r40747247 r9a533ba  
    325325        Variable_t variable;
    326326
    327         struct Attr_t {
    328 //              const std::string * name;
    329                 ExpressionNode * expr;
    330                 DeclarationNode * type;
    331         };
    332         Attr_t attr;
    333 
    334327        struct StaticAssert_t {
    335328                ExpressionNode * condition;
Note: See TracChangeset for help on using the changeset viewer.