- Timestamp:
- Aug 26, 2024, 10:54:57 AM (4 months ago)
- Branches:
- master
- Children:
- ad47ec4, d6b7d1d
- Parents:
- 075c6d5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/TypeData.cpp
r075c6d5 rb965774 1540 1540 1541 1541 1542 // The argument flag (is/is not var-args) of a computed property. 1543 static ast::ArgumentFlag argumentFlag( const TypeData * td ) { 1544 assert( td->kind == TypeData::Function ); 1545 bool isVaArgs = !td->function.params || td->function.params->hasEllipsis; 1546 return (isVaArgs) ? ast::VariableArgs : ast::FixedArgs; 1547 } // argumentFlag 1548 1549 1542 1550 ast::FunctionDecl * buildFunctionDecl( 1543 1551 const TypeData * td, … … 1549 1557 std::vector<ast::ptr<ast::Attribute>> && attributes ) { 1550 1558 assert( td->kind == TypeData::Function ); 1551 // For some reason FunctionDecl takes a bool instead of an ArgumentFlag.1552 bool isVarArgs = !td->function.params || td->function.params->hasEllipsis;1553 1559 ast::CV::Qualifiers cvq = buildQualifiers( td ); 1554 1560 std::vector<ast::ptr<ast::TypeDecl>> forall; … … 1604 1610 std::move( attributes ), 1605 1611 funcSpec, 1606 (isVarArgs) ? ast::VariableArgs : ast::FixedArgs1612 argumentFlag( td ) 1607 1613 ); 1608 1614 buildList( td->function.withExprs, decl->withExprs ); … … 1656 1662 assert( td->kind == TypeData::Function ); 1657 1663 ast::FunctionType * ft = new ast::FunctionType( 1658 ( !td->function.params || td->function.params->hasEllipsis ) 1659 ? ast::VariableArgs : ast::FixedArgs, 1664 argumentFlag( td ), 1660 1665 buildQualifiers( td ) 1661 1666 );
Note: See TracChangeset
for help on using the changeset viewer.