Changeset c1e66d9 for src/Parser
- Timestamp:
- Sep 21, 2023, 10:15:37 PM (2 years ago)
- Branches:
- master
- Children:
- deda7e6
- Parents:
- 01510fe
- 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
r01510fe rc1e66d9 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 } // if 408 409 return newnode->addQualifiers( qualifiers ); 410 } 396 411 397 412 DeclarationNode * DeclarationNode::newVarArray( DeclarationNode * qualifiers ) { -
src/Parser/DeclarationNode.h
r01510fe rc1e66d9 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 ); 68 69 static DeclarationNode * newVarArray( DeclarationNode * qualifiers ); 69 70 static DeclarationNode * newBitfield( ExpressionNode * size ); -
src/Parser/TypeData.cc
r01510fe rc1e66d9 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 } 1023 1026 return at; 1024 1027 } // buildArray -
src/Parser/TypeData.h
r01510fe rc1e66d9 85 85 Kind kind; 86 86 TypeData * base; 87 TypeData * declType; 87 88 DeclarationNode::BasicType basictype = DeclarationNode::NoBasicType; 88 89 DeclarationNode::ComplexType complextype = DeclarationNode::NoComplexType; -
src/Parser/parser.yy
r01510fe rc1e66d9 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 } 3857 3861 | multi_array_dimension 3858 3862 ;
Note:
See TracChangeset
for help on using the changeset viewer.