Changeset 62c6cfa for src/Parser
- Timestamp:
- Sep 23, 2023, 10:50:18 PM (2 years ago)
- Branches:
- master
- Children:
- c7616dd
- Parents:
- deda7e6
- Location:
- src/Parser
- Files:
-
- 5 edited
-
DeclarationNode.cc (modified) (1 diff)
-
DeclarationNode.h (modified) (1 diff)
-
TypeData.cc (modified) (1 diff)
-
TypeData.h (modified) (1 diff)
-
parser.yy (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/DeclarationNode.cc
rdeda7e6 r62c6cfa 394 394 return newnode->addQualifiers( qualifiers ); 395 395 } // DeclarationNode::newArray 396 397 DeclarationNode * DeclarationNode::newInlineEnumeratedArray( DeclarationNode * enumDecl, DeclarationNode * qualifiers ) {398 DeclarationNode * newnode = new DeclarationNode;399 newnode->type = new TypeData( TypeData::Array );400 newnode->type->array.isStatic = false;401 newnode->type->array.isVarLen = false;402 403 if ( enumDecl ) {404 newnode->type->declType = enumDecl->type;405 enumDecl->type = nullptr;406 delete enumDecl;407 } // if408 409 return newnode->addQualifiers( qualifiers );410 }411 396 412 397 DeclarationNode * DeclarationNode::newVarArray( DeclarationNode * qualifiers ) { -
src/Parser/DeclarationNode.h
rdeda7e6 r62c6cfa 66 66 static DeclarationNode * newPointer( DeclarationNode * qualifiers, OperKinds kind ); 67 67 static DeclarationNode * newArray( ExpressionNode * size, DeclarationNode * qualifiers, bool isStatic ); 68 static DeclarationNode * newInlineEnumeratedArray( DeclarationNode * enumDecl, DeclarationNode * qualifiers );69 68 static DeclarationNode * newVarArray( DeclarationNode * qualifiers ); 70 69 static DeclarationNode * newBitfield( ExpressionNode * size ); -
src/Parser/TypeData.cc
rdeda7e6 r62c6cfa 1021 1021 ); 1022 1022 } // if 1023 if ( td->declType) {1024 at->declaredType = buildEnum( td->declType, std::vector<ast::ptr<ast::Attribute>>(), ast::Linkage::Cforall );1025 }1026 1023 return at; 1027 1024 } // buildArray -
src/Parser/TypeData.h
rdeda7e6 r62c6cfa 85 85 Kind kind; 86 86 TypeData * base; 87 TypeData * declType;88 87 DeclarationNode::BasicType basictype = DeclarationNode::NoBasicType; 89 88 DeclarationNode::ComplexType complextype = DeclarationNode::NoComplexType; -
src/Parser/parser.yy
rdeda7e6 r62c6cfa 3855 3855 | '[' push array_type_list pop ']' // CFA 3856 3856 { $$ = DeclarationNode::newArray( $3, nullptr, false ); } 3857 | '[' push INLINE enum_type_nobody pop']'3858 {3859 $$ = DeclarationNode::newInlineEnumeratedArray( $4, nullptr );3860 }3861 3857 | multi_array_dimension 3862 3858 ;
Note:
See TracChangeset
for help on using the changeset viewer.