Changeset 9a533ba for src/Parser
- Timestamp:
- Feb 21, 2023, 3:39:17 PM (2 years ago)
- Branches:
- ADT, ast-experimental, master
- Children:
- 640b3df
- Parents:
- 40747247
- Location:
- src/Parser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/Parser/DeclarationNode.cc ¶
r40747247 r9a533ba 61 61 variable.initializer = nullptr; 62 62 63 // attr.name = nullptr;64 attr.expr = nullptr;65 attr.type = nullptr;66 67 63 assert.condition = nullptr; 68 64 assert.message = nullptr; … … 70 66 71 67 DeclarationNode::~DeclarationNode() { 72 // delete attr.name;73 delete attr.expr;74 delete attr.type;75 76 68 // delete variable.name; 77 69 delete variable.assertions; … … 114 106 newnode->variable.assertions = maybeClone( variable.assertions ); 115 107 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 );120 108 121 109 newnode->assert.condition = maybeClone( assert.condition ); … … 1213 1201 assert( type ); 1214 1202 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 } // if1220 1221 1203 switch ( type->kind ) { 1222 1204 case TypeData::Enum: -
TabularUnified src/Parser/ParseNode.h ¶
r40747247 r9a533ba 325 325 Variable_t variable; 326 326 327 struct Attr_t {328 // const std::string * name;329 ExpressionNode * expr;330 DeclarationNode * type;331 };332 Attr_t attr;333 334 327 struct StaticAssert_t { 335 328 ExpressionNode * condition;
Note: See TracChangeset
for help on using the changeset viewer.