Changeset 2e9b59b for src/Parser/DeclarationNode.cc
- Timestamp:
- Apr 19, 2022, 3:00:04 PM (3 years ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
- Children:
- 5b84a321
- Parents:
- ba897d21 (diff), bb7c77d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/DeclarationNode.cc
rba897d21 r2e9b59b 78 78 delete variable.initializer; 79 79 80 delete type;80 // delete type; 81 81 delete bitfieldWidth; 82 82 … … 253 253 } // DeclarationNode::newAggregate 254 254 255 DeclarationNode * DeclarationNode::newEnum( const string * name, DeclarationNode * constants, bool body 255 DeclarationNode * DeclarationNode::newEnum( const string * name, DeclarationNode * constants, bool body, bool typed) { 256 256 DeclarationNode * newnode = new DeclarationNode; 257 257 newnode->type = new TypeData( TypeData::Enum ); … … 263 263 } // DeclarationNode::newEnum 264 264 265 266 265 267 DeclarationNode * DeclarationNode::newName( const string * name ) { 266 268 DeclarationNode * newnode = new DeclarationNode; … … 270 272 } // DeclarationNode::newName 271 273 272 DeclarationNode * DeclarationNode::newEnumConstant( const string * name, ExpressionNode * constant ) { 274 DeclarationNode * DeclarationNode::newEnumConstant( const string * name, ExpressionNode * constant ) { // Marker 273 275 DeclarationNode * newnode = newName( name ); 274 276 newnode->enumeratorValue.reset( constant ); … … 665 667 } 666 668 669 DeclarationNode * DeclarationNode::addEnumBase( DeclarationNode * o ) { 670 if ( o && o -> type) { 671 type->base= o->type; 672 } 673 delete o; 674 return this; 675 } 676 667 677 DeclarationNode * DeclarationNode::addTypedef() { 668 678 TypeData * newtype = new TypeData( TypeData::Symbolic );
Note:
See TracChangeset
for help on using the changeset viewer.