Changeset 2737b37 for src


Ignore:
Timestamp:
May 1, 2026, 11:59:42 AM (16 hours ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
efa8439a
Parents:
f69dafc
Message:

formatting

Location:
src/Parser
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ExpressionNode.cpp

    rf69dafc r2737b37  
    1010// Created On       : Sat May 16 13:17:07 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Apr  1 08:13:17 2025
    13 // Update Count     : 1122
     12// Last Modified On : Fri May  1 11:07:48 2026
     13// Update Count     : 1128
    1414//
    1515
     
    125125} // scanbin
    126126
    127 ast::Expr * build_constantInteger(
    128                 const CodeLocation & location, string & str ) {
     127ast::Expr * build_constantInteger( const CodeLocation & location, string & str ) {
    129128        static const ast::BasicKind kind[2][6] = {
    130129                // short (h) must be before char (hh) because shorter type has the longer suffix
     
    303302
    304303        // Constant type is correct for overload resolving.
    305         ret = new ast::ConstantExpr( location,
    306                 new ast::BasicType( kind[Unsigned][type] ), str, v );
     304        ret = new ast::ConstantExpr( location, new ast::BasicType( kind[Unsigned][type] ), str, v );
    307305        if ( Unsigned && type < 2 ) {                                           // hh or h, less than int ?
    308306                // int i = -1uh => 65535 not -1, so cast is necessary for unsigned, which unfortunately eliminates warnings for large values.
    309                 ret = new ast::CastExpr( location,
    310                         ret,
    311                         new ast::BasicType( kind[Unsigned][type] ),
    312                         ast::ExplicitCast );
     307                ret = new ast::CastExpr( location, ret, new ast::BasicType( kind[Unsigned][type] ), ast::ExplicitCast );
    313308        } else if ( ltype != -1 ) {                                                     // explicit length ?
    314309                if ( ltype == 6 ) {                                                             // int128, (int128)constant
    315                         ret2 = new ast::ConstantExpr( location,
    316                                 new ast::BasicType( ast::BasicKind::LongLongSignedInt ),
    317                                 str2,
    318                                 v2 );
     310                        ret2 = new ast::ConstantExpr( location, new ast::BasicType( ast::BasicKind::LongLongSignedInt ), str2, v2 );
    319311                        ret = build_compoundLiteral( location,
    320                                 DeclarationNode::newFromTypeData(
    321                                         addType(
    322                                                 build_basic_type( TypeData::Int128 ),
    323                                                 build_signedness( TypeData::Unsigned ) ) ),
    324                                 new InitializerNode(
    325                                         (new InitializerNode( new ExpressionNode( v2 == 0 ? ret2 : ret ) ))->set_last( new InitializerNode( new ExpressionNode( v2 == 0 ? ret : ret2 ) ) ), true )
     312                                DeclarationNode::newFromTypeData( addType( build_basic_type( TypeData::Int128 ), build_signedness( TypeData::Unsigned ) ) ),
     313                                new InitializerNode( (new InitializerNode( new ExpressionNode( v2 == 0 ? ret2 : ret ) ))->set_last( new InitializerNode( new ExpressionNode( v2 == 0 ? ret : ret2 ) ) ), true )
    326314                        );
    327315                } else {                                                                                // explicit length, (length_type)constant
    328                         ret = new ast::CastExpr( location,
    329                                 ret,
    330                                 new ast::TypeInstType( lnthsInt[Unsigned][ltype], ast::TypeDecl::Dtype ),
    331                                 ast::ExplicitCast );
     316                        ret = new ast::CastExpr( location, ret, new ast::TypeInstType( lnthsInt[Unsigned][ltype], ast::TypeDecl::Dtype ), ast::ExplicitCast );
    332317                        if ( ltype == 5 ) {                                                     // pointer, intptr( (uintptr_t)constant )
    333                                 ret = build_func( location,
    334                                         new ExpressionNode(
    335                                                 build_varref( location, new string( "intptr" ) ) ),
    336                                         new ExpressionNode( ret ) );
     318                                ret = build_func( location, new ExpressionNode( build_varref( location, new string( "intptr" ) ) ), new ExpressionNode( ret ) );
    337319                        } // if
    338320                } // if
     
    378360
    379361
    380 ast::Expr * build_constantFloat(
    381                 const CodeLocation & location, string & str ) {
     362ast::Expr * build_constantFloat( const CodeLocation & location, string & str ) {
    382363        static const ast::BasicKind kind[2][12] = {
    383364                { ast::BasicKind::Float, ast::BasicKind::Double, ast::BasicKind::LongDouble, ast::BasicKind::Float80, ast::BasicKind::uuFloat128, ast::BasicKind::Float16, ast::BasicKind::Float32, ast::BasicKind::Float32x, ast::BasicKind::Float64, ast::BasicKind::Float64x, ast::BasicKind::Float128, ast::BasicKind::Float128x },
     
    419400
    420401        assert( 0 <= type && type < 12 );
    421         ast::Expr * ret = new ast::ConstantExpr( location,
    422                 new ast::BasicType( kind[complx][type] ),
    423                 str,
    424                 v );
     402        ast::Expr * ret = new ast::ConstantExpr( location, new ast::BasicType( kind[complx][type] ), str, v );
    425403        // explicit length ?
    426404        if ( explnth ) {
    427                 ret = new ast::CastExpr( location,
    428                         ret,
    429                         new ast::BasicType( kind[complx][type] ),
    430                         ast::ExplicitCast );
     405                ret = new ast::CastExpr( location, ret, new ast::BasicType( kind[complx][type] ), ast::ExplicitCast );
    431406        } // if
    432407
     
    446421        ast::Type * kind;
    447422        switch ( str[0] ) {                                                                     // str has >= 2 characters, i.e, null string "" => safe to look at subscripts 0/1
    448         case 'u':
     423          case 'u':
    449424                if ( str[1] == '8' ) goto Default;                              // utf-8 characters => array of char (save check for char as no 8 allowed)
    450425                // lookup type of associated typedef
    451426                kind = new ast::TypeInstType( "char16_t", ast::TypeDecl::Dtype );
    452427                break;
    453         case 'U':
     428          case 'U':
    454429                kind = new ast::TypeInstType( "char32_t", ast::TypeDecl::Dtype );
    455430                break;
    456         case 'L':
     431          case 'L':
    457432                kind = new ast::TypeInstType( "wchar_t", ast::TypeDecl::Dtype );
    458433                break;
    459         Default:                                                                                        // char default string type
    460         default:
     434          Default:                                                                                      // char default string type
     435          default:
    461436                kind = new ast::BasicType( ast::BasicKind::Char );
    462437        } // switch
     
    544519} // build_constantStr
    545520
    546 ast::Expr * build_field_name_FLOATING_FRACTIONconstant(
    547                 const CodeLocation & location, const string & str ) {
     521ast::Expr * build_field_name_FLOATING_FRACTIONconstant( const CodeLocation & location, const string & str ) {
    548522        if ( str.find_first_not_of( "0123456789", 1 ) != string::npos ) SemanticError( yylloc, "invalid tuple index \"%s\".", str.c_str() );
    549         ast::Expr * ret = build_constantInteger( location,
    550                 *new string( str.substr(1) ) );
     523        ast::Expr * ret = build_constantInteger( location, *new string( str.substr(1) ) );
    551524        delete &str;
    552525        return ret;
    553526} // build_field_name_FLOATING_FRACTIONconstant
    554527
    555 ast::Expr * build_field_name_FLOATING_DECIMALconstant(
    556                 const CodeLocation & location, const string & str ) {
     528ast::Expr * build_field_name_FLOATING_DECIMALconstant( const CodeLocation & location, const string & str ) {
    557529        if ( str[str.size() - 1] != '.' ) SemanticError( yylloc, "invalid tuple index \"%s\".", str.c_str() );
    558         ast::Expr * ret = build_constantInteger(
    559                 location, *new string( str.substr( 0, str.size()-1 ) ) );
     530        ast::Expr * ret = build_constantInteger( location, *new string( str.substr( 0, str.size()-1 ) ) );
    560531        delete &str;
    561532        return ret;
    562533} // build_field_name_FLOATING_DECIMALconstant
    563534
    564 ast::Expr * build_field_name_FLOATINGconstant( const CodeLocation & location,
    565                 const string & str ) {
     535ast::Expr * build_field_name_FLOATINGconstant( const CodeLocation & location, const string & str ) {
    566536        // str is of the form A.B -> separate at the . and return member expression
    567537        int a, b;
     
    569539        stringstream ss( str );
    570540        ss >> a >> dot >> b;
    571         auto ret = new ast::UntypedMemberExpr( location,
    572                 ast::ConstantExpr::from_int( location, b ),
    573                 ast::ConstantExpr::from_int( location, a )
     541        auto ret = new ast::UntypedMemberExpr( location, ast::ConstantExpr::from_int( location, b ), ast::ConstantExpr::from_int( location, a )
    574542        );
    575543        delete &str;
     
    577545} // build_field_name_FLOATINGconstant
    578546
    579 ast::Expr * make_field_name_fraction_constants( const CodeLocation & location,
    580                 ast::Expr * fieldName,
    581                 ast::Expr * fracts ) {
     547ast::Expr * make_field_name_fraction_constants( const CodeLocation & location, ast::Expr * fieldName, ast::Expr * fracts ) {
    582548        if ( nullptr == fracts ) {
    583549                return fieldName;
    584550        } else if ( auto memberExpr = dynamic_cast<ast::UntypedMemberExpr *>( fracts ) ) {
    585                 memberExpr->member = make_field_name_fraction_constants( location,
    586                         fieldName,
    587                         ast::mutate( memberExpr->aggregate.get() ) );
     551                memberExpr->member = make_field_name_fraction_constants( location, fieldName, ast::mutate( memberExpr->aggregate.get() ) );
    588552                return memberExpr;
    589553        } else {
     
    592556} // make_field_name_fraction_constants
    593557
    594 ast::Expr * build_field_name_fraction_constants( const CodeLocation & location,
    595                 ast::Expr * fieldName,
    596                 ExpressionNode * fracts ) {
     558ast::Expr * build_field_name_fraction_constants( const CodeLocation & location, ast::Expr * fieldName, ExpressionNode * fracts ) {
    597559        return make_field_name_fraction_constants( location, fieldName, maybeMoveBuild( fracts ) );
    598560} // build_field_name_fraction_constants
    599561
    600 ast::NameExpr * build_varref( const CodeLocation & location,
    601                 const string * name ) {
     562ast::NameExpr * build_varref( const CodeLocation & location, const string * name ) {
    602563        ast::NameExpr * expr = new ast::NameExpr( location, *name );
    603564        delete name;
     
    605566} // build_varref
    606567
    607 ast::QualifiedNameExpr * build_qualified_expr( const CodeLocation & location,
    608                 const DeclarationNode * decl_node,
    609                 const ast::NameExpr * name ) {
     568ast::QualifiedNameExpr * build_qualified_expr( const CodeLocation & location, const DeclarationNode * decl_node, const ast::NameExpr * name ) {
    610569        ast::Decl * newDecl = maybeBuild( decl_node );
    611570        if ( ast::DeclWithType * newDeclWithType = dynamic_cast<ast::DeclWithType *>( newDecl ) ) {
     
    619578}
    620579
    621 ast::QualifiedNameExpr * build_qualified_expr( const CodeLocation & location,
    622                 const ast::EnumDecl * decl,
    623                 const ast::NameExpr * name ) {
     580ast::QualifiedNameExpr * build_qualified_expr( const CodeLocation & location, const ast::EnumDecl * decl, const ast::NameExpr * name ) {
    624581        return new ast::QualifiedNameExpr( location, decl, name->name );
    625582}
    626583
    627 ast::DimensionExpr * build_dimensionref( const CodeLocation & location,
    628                 const string * name ) {
     584ast::DimensionExpr * build_dimensionref( const CodeLocation & location, const string * name ) {
    629585        ast::DimensionExpr * expr = new ast::DimensionExpr( location, *name );
    630586        delete name;
     
    643599}; // OperName
    644600
    645 ast::Expr * build_cast( const CodeLocation & location,
    646                 DeclarationNode * decl_node,
    647                 ExpressionNode * expr_node,
    648                 ast::CastKind kind ) {
     601ast::Expr * build_cast( const CodeLocation & location, DeclarationNode * decl_node, ExpressionNode * expr_node, ast::CastKind kind ) {
    649602        ast::Type * targetType = maybeMoveBuildType( decl_node );
    650603        if ( dynamic_cast<ast::VoidType *>( targetType ) ) {
    651604                delete targetType;
    652                 return new ast::CastExpr( location,
    653                         maybeMoveBuild( expr_node ),
    654                         ast::ExplicitCast, kind );
     605                return new ast::CastExpr( location, maybeMoveBuild( expr_node ), ast::ExplicitCast, kind );
    655606        } else {
    656                 return new ast::CastExpr( location,
    657                         maybeMoveBuild( expr_node ),
    658                         targetType,
    659                         ast::ExplicitCast, kind );
     607                return new ast::CastExpr( location, maybeMoveBuild( expr_node ), targetType, ast::ExplicitCast, kind );
    660608        } // if
    661609} // build_cast
    662610
    663 ast::Expr * build_keyword_cast( const CodeLocation & location,
    664                 ast::AggregateDecl::Aggregate target,
    665                 ExpressionNode * expr_node ) {
    666         return new ast::KeywordCastExpr( location,
    667                 maybeMoveBuild( expr_node ),
    668                 target
    669         );
     611ast::Expr * build_keyword_cast( const CodeLocation & location, ast::AggregateDecl::Aggregate target, ExpressionNode * expr_node ) {
     612        return new ast::KeywordCastExpr( location, maybeMoveBuild( expr_node ), target );
    670613}
    671614
    672 ast::Expr * build_virtual_cast( const CodeLocation & location,
    673                 DeclarationNode * decl_node,
    674                 ExpressionNode * expr_node ) {
    675         return new ast::VirtualCastExpr( location,
    676                 maybeMoveBuild( expr_node ),
    677                 maybeMoveBuildType( decl_node )
    678         );
     615ast::Expr * build_virtual_cast( const CodeLocation & location, DeclarationNode * decl_node, ExpressionNode * expr_node ) {
     616        return new ast::VirtualCastExpr( location, maybeMoveBuild( expr_node ), maybeMoveBuildType( decl_node ) );
    679617} // build_virtual_cast
    680618
    681 ast::Expr * build_fieldSel( const CodeLocation & location,
    682                 ExpressionNode * expr_node,
    683                 ast::Expr * member ) {
    684         return new ast::UntypedMemberExpr( location,
    685                 member,
    686                 maybeMoveBuild( expr_node )
    687         );
     619ast::Expr * build_fieldSel( const CodeLocation & location, ExpressionNode * expr_node, ast::Expr * member ) {
     620        return new ast::UntypedMemberExpr( location, member, maybeMoveBuild( expr_node ) );
    688621} // build_fieldSel
    689622
    690 ast::Expr * build_pfieldSel( const CodeLocation & location,
    691                 ExpressionNode * expr_node,
    692                 ast::Expr * member ) {
    693         auto deref = new ast::UntypedExpr( location,
    694                 new ast::NameExpr( location, "*?" )
    695         );
     623ast::Expr * build_pfieldSel( const CodeLocation & location, ExpressionNode * expr_node, ast::Expr * member ) {
     624        auto deref = new ast::UntypedExpr( location, new ast::NameExpr( location, "*?" ) );
    696625        deref->location = expr_node->location;
    697626        deref->args.push_back( maybeMoveBuild( expr_node ) );
     
    700629} // build_pfieldSel
    701630
    702 ast::Expr * build_offsetOf( const CodeLocation & location,
    703                 DeclarationNode * decl_node,
    704                 ast::NameExpr * member ) {
    705         ast::Expr * ret = new ast::UntypedOffsetofExpr( location,
    706                 maybeMoveBuildType( decl_node ),
    707                 member->name
    708         );
     631ast::Expr * build_offsetOf( const CodeLocation & location, DeclarationNode * decl_node, ast::NameExpr * member ) {
     632        ast::Expr * ret = new ast::UntypedOffsetofExpr( location, maybeMoveBuildType( decl_node ), member->name );
    709633        ret->result = new ast::BasicType( ast::BasicKind::LongUnsignedInt );
    710634        delete member;
     
    712636} // build_offsetOf
    713637
    714 ast::Expr * build_and_or( const CodeLocation & location,
    715                 ExpressionNode * expr_node1,
    716                 ExpressionNode * expr_node2,
    717                 ast::LogicalFlag flag ) {
    718         return new ast::LogicalExpr( location,
    719                 maybeMoveBuild( expr_node1 ),
    720                 maybeMoveBuild( expr_node2 ),
    721                 flag
    722         );
     638ast::Expr * build_and_or( const CodeLocation & location, ExpressionNode * expr_node1, ExpressionNode * expr_node2, ast::LogicalFlag flag ) {
     639        return new ast::LogicalExpr( location, maybeMoveBuild( expr_node1 ), maybeMoveBuild( expr_node2 ), flag );
    723640} // build_and_or
    724641
    725 ast::Expr * build_unary_val( const CodeLocation & location,
    726                 OperKinds op,
    727                 ExpressionNode * expr_node ) {
     642ast::Expr * build_unary_val( const CodeLocation & location, OperKinds op, ExpressionNode * expr_node ) {
    728643        std::vector<ast::ptr<ast::Expr>> args;
    729644        args.push_back( maybeMoveBuild( expr_node ) );
    730         return new ast::UntypedExpr( location,
    731                 new ast::NameExpr( location, OperName[ (int)op ] ),
    732                 std::move( args )
    733         );
     645        return new ast::UntypedExpr( location, new ast::NameExpr( location, OperName[ (int)op ] ), std::move( args ) );
    734646} // build_unary_val
    735647
    736 ast::Expr * build_binary_val( const CodeLocation & location,
    737                 OperKinds op,
    738                 ExpressionNode * expr_node1,
    739                 ExpressionNode * expr_node2 ) {
     648ast::Expr * build_binary_val( const CodeLocation & location, OperKinds op, ExpressionNode * expr_node1, ExpressionNode * expr_node2 ) {
    740649        std::vector<ast::ptr<ast::Expr>> args;
    741650        args.push_back( maybeMoveBuild( expr_node1 ) );
    742651        args.push_back( maybeMoveBuild( expr_node2 ) );
    743         return new ast::UntypedExpr( location,
    744                 new ast::NameExpr( location, OperName[ (int)op ] ),
    745                 std::move( args )
    746         );
     652        return new ast::UntypedExpr( location, new ast::NameExpr( location, OperName[ (int)op ] ), std::move( args ) );
    747653} // build_binary_val
    748654
    749 ast::Expr * build_cond( const CodeLocation & location,
    750                 ExpressionNode * expr_node1,
    751                 ExpressionNode * expr_node2,
    752                 ExpressionNode * expr_node3 ) {
    753         return new ast::ConditionalExpr( location,
    754                 maybeMoveBuild( expr_node1 ),
    755                 maybeMoveBuild( expr_node2 ),
    756                 maybeMoveBuild( expr_node3 )
    757         );
     655ast::Expr * build_cond( const CodeLocation & location, ExpressionNode * expr_node1, ExpressionNode * expr_node2, ExpressionNode * expr_node3 ) {
     656        return new ast::ConditionalExpr( location, maybeMoveBuild( expr_node1 ), maybeMoveBuild( expr_node2 ), maybeMoveBuild( expr_node3 ) );
    758657} // build_cond
    759658
    760 ast::Expr * build_tuple( const CodeLocation & location,
    761                 ExpressionNode * expr_node ) {
     659ast::Expr * build_tuple( const CodeLocation & location, ExpressionNode * expr_node ) {
    762660        std::vector<ast::ptr<ast::Expr>> exprs;
    763661        buildMoveList( expr_node, exprs );
     
    765663} // build_tuple
    766664
    767 ast::Expr * build_func( const CodeLocation & location,
    768                 ExpressionNode * function,
    769                 ExpressionNode * expr_node ) {
     665ast::Expr * build_func( const CodeLocation & location, ExpressionNode * function, ExpressionNode * expr_node ) {
    770666        std::vector<ast::ptr<ast::Expr>> args;
    771667        buildMoveList( expr_node, args );
    772         return new ast::UntypedExpr( location,
    773                 maybeMoveBuild( function ),
    774                 std::move( args )
    775         );
     668        return new ast::UntypedExpr( location, maybeMoveBuild( function ), std::move( args ) );
    776669} // build_func
    777670
    778 ast::Expr * build_compoundLiteral( const CodeLocation & location,
    779                 DeclarationNode * decl_node,
    780                 InitializerNode * kids ) {
     671ast::Expr * build_compoundLiteral( const CodeLocation & location, DeclarationNode * decl_node, InitializerNode * kids ) {
    781672        // compound literal type
    782673        ast::Decl * newDecl = maybeBuild( decl_node );
    783674        // non-sue compound-literal type
    784675        if ( ast::DeclWithType * newDeclWithType = dynamic_cast<ast::DeclWithType *>( newDecl ) ) {
    785                 return new ast::CompoundLiteralExpr( location,
    786                         newDeclWithType->get_type(),
    787                         maybeMoveBuild( kids ) );
     676                return new ast::CompoundLiteralExpr( location, newDeclWithType->get_type(), maybeMoveBuild( kids ) );
    788677        // these types do not have associated type information
    789678        } else if ( auto newDeclStructDecl = dynamic_cast<ast::StructDecl *>( newDecl ) ) {
    790679                if ( newDeclStructDecl->body ) {
    791                         return new ast::CompoundLiteralExpr( location,
    792                                 new ast::StructInstType( newDeclStructDecl ),
    793                                 maybeMoveBuild( kids ) );
     680                        return new ast::CompoundLiteralExpr( location, new ast::StructInstType( newDeclStructDecl ), maybeMoveBuild( kids ) );
    794681                } else {
    795                         return new ast::CompoundLiteralExpr( location,
    796                                 new ast::StructInstType( newDeclStructDecl->name ),
    797                                 maybeMoveBuild( kids ) );
     682                        return new ast::CompoundLiteralExpr( location, new ast::StructInstType( newDeclStructDecl->name ), maybeMoveBuild( kids ) );
    798683                } // if
    799684        } else if ( auto newDeclUnionDecl = dynamic_cast<ast::UnionDecl *>( newDecl )  ) {
    800685                if ( newDeclUnionDecl->body ) {
    801                         return new ast::CompoundLiteralExpr( location,
    802                                 new ast::UnionInstType( newDeclUnionDecl ),
    803                                 maybeMoveBuild( kids ) );
     686                        return new ast::CompoundLiteralExpr( location, new ast::UnionInstType( newDeclUnionDecl ), maybeMoveBuild( kids ) );
    804687                } else {
    805                         return new ast::CompoundLiteralExpr( location,
    806                                 new ast::UnionInstType( newDeclUnionDecl->name ),
    807                                 maybeMoveBuild( kids ) );
     688                        return new ast::CompoundLiteralExpr( location, new ast::UnionInstType( newDeclUnionDecl->name ), maybeMoveBuild( kids ) );
    808689                } // if
    809690        } else if ( auto newDeclEnumDecl = dynamic_cast<ast::EnumDecl *>( newDecl )  ) {
    810691                if ( newDeclEnumDecl->body ) {
    811                         return new ast::CompoundLiteralExpr( location,
    812                                 new ast::EnumInstType( newDeclEnumDecl ),
    813                                 maybeMoveBuild( kids ) );
     692                        return new ast::CompoundLiteralExpr( location, new ast::EnumInstType( newDeclEnumDecl ), maybeMoveBuild( kids ) );
    814693                } else {
    815                         return new ast::CompoundLiteralExpr( location,
    816                                 new ast::EnumInstType( newDeclEnumDecl->name ),
    817                                 maybeMoveBuild( kids ) );
     694                        return new ast::CompoundLiteralExpr( location, new ast::EnumInstType( newDeclEnumDecl->name ), maybeMoveBuild( kids ) );
    818695                } // if
    819696        } else {
     
    822699} // build_compoundLiteral
    823700
    824 ast::Expr * build_va_arg( const CodeLocation & location,
    825                 ExpressionNode * function, DeclarationNode * declaration ) {
    826         return build_func( location,
    827                 new ExpressionNode(
    828                         build_varref( location, new std::string( "__builtin_va_arg" ) ) ),
    829                 function->set_last( new ExpressionNode( new ast::TypeExpr( location,
    830                         maybeMoveBuildType( declaration ) ) ) )
    831         );
     701ast::Expr * build_va_arg( const CodeLocation & location, ExpressionNode * function, DeclarationNode * declaration ) {
     702        return build_func( location, new ExpressionNode( build_varref( location, new std::string( "__builtin_va_arg" ) ) ),
     703                function->set_last( new ExpressionNode( new ast::TypeExpr( location, maybeMoveBuildType( declaration ) ) ) ) );
    832704}
    833705
  • src/Parser/parser.yy

    rf69dafc r2737b37  
    1010// Created On       : Sat Sep  1 20:22:55 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed Mar 11 11:09:33 2026
    13 // Update Count     : 7300
     12// Last Modified On : Fri May  1 11:01:45 2026
     13// Update Count     : 7320
    1414//
    1515
     
    5454#include "Common/SemanticError.hpp"                     // error_str
    5555#include "Common/Utility.hpp"                           // for maybeMoveBuild, maybeBuild, CodeLo...
    56 #include "AST/Attribute.hpp"         // for Attribute
    57 #include "AST/Print.hpp"             // for print
    58 #include "Common/Iterate.hpp"        // for reverseIterate
     56#include "Common/Iterate.hpp"                                                   // for reverseIterate
     57#include "AST/Attribute.hpp"                                                    // for Attribute
     58#include "AST/Print.hpp"                                                                // for print
    5959
    6060// lex uses __null in a boolean context, it's fine.
     
    443443%type<ifctrl> conditional_declaration
    444444%type<forctrl> for_control_expression   for_control_expression_list
    445 %type<oper> upupeq      updown  updownS updownEq
     445%type<oper> upupeq updown updownS updownEq
    446446%type<expr> subrange
    447447%type<decl> asm_name_opt
     
    880880                { $$ = new ExpressionNode( build_field_name_fraction_constants( yylloc, build_field_name_FLOATINGconstant( yylloc, *$1 ), $2 ) ); }
    881881        | identifier_at fraction_constants_opt                          // CFA, allow anonymous fields
    882                 {
    883                         $$ = new ExpressionNode( build_field_name_fraction_constants( yylloc, build_varref( yylloc, $1 ), $2 ) );
    884                 }
     882                { $$ = new ExpressionNode( build_field_name_fraction_constants( yylloc, build_varref( yylloc, $1 ), $2 ) );     }
    885883        ;
    886884
Note: See TracChangeset for help on using the changeset viewer.