Changeset 4c0b674 for src/Parser


Ignore:
Timestamp:
Feb 27, 2024, 10:56:31 AM (3 months ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
master
Children:
dc3fbe5
Parents:
bc61563
Message:

Moved ParseNode?'s name field down to DeclarationNode?, it is not used in any of the other child classes.

Location:
src/Parser
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/DeclarationNode.cc

    rbc61563 r4c0b674  
    8282
    8383DeclarationNode::~DeclarationNode() {
     84        delete name;
     85
    8486//      delete variable.name;
    8587        delete variable.assertions;
  • src/Parser/DeclarationNode.h

    rbc61563 r4c0b674  
    131131        DeclarationNode * get_last() { return (DeclarationNode *)ParseNode::get_last(); }
    132132
     133        const std::string * name = nullptr;
     134
    133135        struct Variable_t {
    134136//              const std::string * name;
  • src/Parser/ParseNode.h

    rbc61563 r4c0b674  
    4848  public:
    4949        ParseNode() {};
    50         virtual ~ParseNode() { delete next; delete name; };
     50        virtual ~ParseNode() { delete next; };
    5151        virtual ParseNode * clone() const = 0;
    5252
     
    7373
    7474        ParseNode * next = nullptr;
    75         const std::string * name = nullptr;
    7675        CodeLocation location = yylloc;
    7776}; // ParseNode
Note: See TracChangeset for help on using the changeset viewer.