Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/DeclarationNode.cc

    rb38f6da r45e753c  
    99// Author           : Rodolfo G. Esteves
    1010// Created On       : Sat May 16 12:34:05 2015
    11 // Last Modified By : Peter A. Buhr
    12 // Last Modified On : Sat Jun 17 14:41:48 2023
    13 // Update Count     : 1405
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Thr Apr 20 11:46:00 2023
     13// Update Count     : 1393
    1414//
    1515
     
    459459        std::vector<ast::ptr<ast::Expr>> exprs;
    460460        buildList( expr, exprs );
    461         newnode->attributes.push_back( new ast::Attribute( *name, std::move( exprs ) ) );
     461        newnode->attributes.push_back(
     462                new ast::Attribute( *name, std::move( exprs ) ) );
    462463        delete name;
    463464        return newnode;
     
    632633                                        dst->basictype = src->basictype;
    633634                                } else if ( src->basictype != DeclarationNode::NoBasicType )
    634                                         SemanticError( yylloc, string( "multiple declaration types \"" ) + DeclarationNode::basicTypeNames[ dst->basictype ] +
    635                                                                    "\" and \"" + DeclarationNode::basicTypeNames[ src->basictype ] + "\"." );
     635                                        SemanticError( yylloc, src, string( "conflicting type specifier " ) + DeclarationNode::basicTypeNames[ src->basictype ] + " in type: " );
    636636
    637637                                if ( dst->complextype == DeclarationNode::NoComplexType ) {
    638638                                        dst->complextype = src->complextype;
    639639                                } else if ( src->complextype != DeclarationNode::NoComplexType )
    640                                         SemanticError( yylloc, string( "multiple declaration types \"" ) + DeclarationNode::complexTypeNames[ src->complextype ] +
    641                                                                    "\" and \"" + DeclarationNode::complexTypeNames[ src->complextype ] + "\"." );
     640                                        SemanticError( yylloc, src, string( "conflicting type specifier " ) + DeclarationNode::complexTypeNames[ src->complextype ] + " in type: " );
    642641
    643642                                if ( dst->signedness == DeclarationNode::NoSignedness ) {
    644643                                        dst->signedness = src->signedness;
    645644                                } else if ( src->signedness != DeclarationNode::NoSignedness )
    646                                         SemanticError( yylloc, string( "conflicting type specifier \"" ) + DeclarationNode::signednessNames[ dst->signedness ] +
    647                                                                    "\" and \"" + DeclarationNode::signednessNames[ src->signedness ] + "\"." );
     645                                        SemanticError( yylloc, src, string( "conflicting type specifier " ) + DeclarationNode::signednessNames[ src->signedness ] + " in type: " );
    648646
    649647                                if ( dst->length == DeclarationNode::NoLength ) {
     
    652650                                        dst->length = DeclarationNode::LongLong;
    653651                                } else if ( src->length != DeclarationNode::NoLength )
    654                                         SemanticError( yylloc, string( "conflicting type specifier \"" ) + DeclarationNode::lengthNames[ dst->length ] +
    655                                                                    "\" and \"" + DeclarationNode::lengthNames[ src->length ] + "\"." );
     652                                        SemanticError( yylloc, src, string( "conflicting type specifier " ) + DeclarationNode::lengthNames[ src->length ] + " in type: " );
    656653                        } // if
    657654                        break;
     
    721718
    722719DeclarationNode * DeclarationNode::addEnumBase( DeclarationNode * o ) {
    723         if ( o && o->type)  {
     720        if ( o && o -> type)  {
    724721                type->base= o->type;
    725         } // if
     722        }
    726723        delete o;
    727724        return this;
     
    10061003}
    10071004
    1008 // If a typedef wraps an anonymous declaration, name the inner declaration so it has a consistent name across
    1009 // translation units.
     1005// If a typedef wraps an anonymous declaration, name the inner declaration
     1006// so it has a consistent name across translation units.
    10101007static void nameTypedefedDecl(
    10111008                DeclarationNode * innerDecl,
     
    10881085}
    10891086
    1090 void buildList( DeclarationNode * firstNode, std::vector<ast::ptr<ast::Decl>> & outputList ) {
     1087void buildList( DeclarationNode * firstNode,
     1088                std::vector<ast::ptr<ast::Decl>> & outputList ) {
    10911089        SemanticErrorException errors;
    10921090        std::back_insert_iterator<std::vector<ast::ptr<ast::Decl>>> out( outputList );
Note: See TracChangeset for help on using the changeset viewer.