Changeset f2f512b


Ignore:
Timestamp:
Jul 20, 2018, 3:52:19 PM (3 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer
Children:
1cb35c0
Parents:
f7e4db27
Message:

formatting

Location:
src/Parser
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/DeclarationNode.cc

    rf7e4db27 rf2f512b  
    1010// Created On       : Sat May 16 12:34:05 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jul 19 17:40:03 2018
    13 // Update Count     : 1106
     12// Last Modified On : Fri Jul 20 14:56:54 2018
     13// Update Count     : 1107
    1414//
    1515
     
    124124} // DeclarationNode::clone
    125125
    126 void DeclarationNode::print( std::ostream &os, int indent ) const {
     126void DeclarationNode::print( std::ostream & os, int indent ) const {
    127127        os << string( indent, ' ' );
    128128        if ( name ) {
     
    160160}
    161161
    162 void DeclarationNode::printList( std::ostream &os, int indent ) const {
     162void DeclarationNode::printList( std::ostream & os, int indent ) const {
    163163        ParseNode::printList( os, indent );
    164164        if ( hasEllipsis ) {
     
    514514} // DeclarationNode::copySpecifiers
    515515
    516 static void addQualifiersToType( TypeData *&src, TypeData * dst ) {
     516static void addQualifiersToType( TypeData *& src, TypeData * dst ) {
    517517        if ( dst->base ) {
    518518                addQualifiersToType( src, dst->base );
     
    567567} // addQualifiers
    568568
    569 static void addTypeToType( TypeData *&src, TypeData *&dst ) {
     569static void addTypeToType( TypeData *& src, TypeData *& dst ) {
    570570        if ( src->forall && dst->kind == TypeData::Function ) {
    571571                if ( dst->forall ) {
     
    958958}
    959959
    960 void buildList( const DeclarationNode * firstNode, std::list< Declaration * > &outputList ) {
     960void buildList( const DeclarationNode * firstNode, std::list< Declaration * > & outputList ) {
    961961        SemanticErrorException errors;
    962962        std::back_insert_iterator< std::list< Declaration * > > out( outputList );
     
    10131013                                } // if
    10141014                        } // if
    1015                 } catch( SemanticErrorException &e ) {
     1015                } catch( SemanticErrorException & e ) {
    10161016                        errors.append( e );
    10171017                } // try
     
    10241024
    10251025// currently only builds assertions, function parameters, and return values
    1026 void buildList( const DeclarationNode * firstNode, std::list< DeclarationWithType * > &outputList ) {
     1026void buildList( const DeclarationNode * firstNode, std::list< DeclarationWithType * > & outputList ) {
    10271027        SemanticErrorException errors;
    10281028        std::back_insert_iterator< std::list< DeclarationWithType * > > out( outputList );
     
    10551055                                * out++ = obj;
    10561056                        } // if
    1057                 } catch( SemanticErrorException &e ) {
     1057                } catch( SemanticErrorException & e ) {
    10581058                        errors.append( e );
    10591059                } // try
     
    10651065} // buildList
    10661066
    1067 void buildTypeList( const DeclarationNode * firstNode, std::list< Type * > &outputList ) {
     1067void buildTypeList( const DeclarationNode * firstNode, std::list< Type * > & outputList ) {
    10681068        SemanticErrorException errors;
    10691069        std::back_insert_iterator< std::list< Type * > > out( outputList );
     
    10731073                try {
    10741074                        * out++ = cur->buildType();
    1075                 } catch( SemanticErrorException &e ) {
     1075                } catch( SemanticErrorException & e ) {
    10761076                        errors.append( e );
    10771077                } // try
  • src/Parser/ParseNode.h

    rf7e4db27 rf2f512b  
    1010// Created On       : Sat May 16 13:28:16 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jul 19 15:55:26 2018
    13 // Update Count     : 848
     12// Last Modified On : Fri Jul 20 14:56:30 2018
     13// Update Count     : 850
    1414//
    1515
     
    6868        }
    6969
    70         virtual void print( __attribute__((unused)) std::ostream &os, __attribute__((unused)) int indent = 0 ) const {}
    71         virtual void printList( std::ostream &os, int indent = 0 ) const {
     70        virtual void print( __attribute__((unused)) std::ostream & os, __attribute__((unused)) int indent = 0 ) const {}
     71        virtual void printList( std::ostream & os, int indent = 0 ) const {
    7272                print( os, indent );
    7373                if ( next ) next->print( os, indent );
     
    103103        InitializerNode * next_init() const { return kids; }
    104104
    105         void print( std::ostream &os, int indent = 0 ) const;
     105        void print( std::ostream & os, int indent = 0 ) const;
    106106        void printOneLine( std::ostream & ) const;
    107107
     
    127127        ExpressionNode * set_extension( bool exten ) { extension = exten; return this; }
    128128
    129         virtual void print( std::ostream &os, __attribute__((unused)) int indent = 0 ) const override {
    130                 os << expr.get() << std::endl;
    131         }
    132         void printOneLine( __attribute__((unused)) std::ostream &os, __attribute__((unused)) int indent = 0 ) const {}
     129        virtual void print( std::ostream & os, __attribute__((unused)) int indent = 0 ) const override {
     130                os << expr.get();
     131        }
     132        void printOneLine( __attribute__((unused)) std::ostream & os, __attribute__((unused)) int indent = 0 ) const {}
    133133
    134134        template<typename T>
     
    290290        }
    291291
    292         virtual void print( __attribute__((unused)) std::ostream &os, __attribute__((unused)) int indent = 0 ) const override;
    293         virtual void printList( __attribute__((unused)) std::ostream &os, __attribute__((unused)) int indent = 0 ) const override;
     292        virtual void print( __attribute__((unused)) std::ostream & os, __attribute__((unused)) int indent = 0 ) const override;
     293        virtual void printList( __attribute__((unused)) std::ostream & os, __attribute__((unused)) int indent = 0 ) const override;
    294294
    295295        Declaration * build() const;
     
    381381        virtual StatementNode * append_last_case( StatementNode * );
    382382
    383         virtual void print( std::ostream &os, __attribute__((unused)) int indent = 0 ) const override {
     383        virtual void print( std::ostream & os, __attribute__((unused)) int indent = 0 ) const override {
    384384                os << stmt.get() << std::endl;
    385385        }
     
    439439
    440440template< typename SynTreeType, typename NodeType, template< typename, typename...> class Container, typename... Args >
    441 void buildList( const NodeType * firstNode, Container< SynTreeType *, Args... > &outputList ) {
     441void buildList( const NodeType * firstNode, Container< SynTreeType *, Args... > & outputList ) {
    442442        SemanticErrorException errors;
    443443        std::back_insert_iterator< Container< SynTreeType *, Args... > > out( outputList );
     
    453453                                assertf(false, "buildList unknown type");
    454454                        } // if
    455                 } catch( SemanticErrorException &e ) {
     455                } catch( SemanticErrorException & e ) {
    456456                        errors.append( e );
    457457                } // try
     
    464464
    465465// in DeclarationNode.cc
    466 void buildList( const DeclarationNode * firstNode, std::list< Declaration * > &outputList );
    467 void buildList( const DeclarationNode * firstNode, std::list< DeclarationWithType * > &outputList );
    468 void buildTypeList( const DeclarationNode * firstNode, std::list< Type * > &outputList );
     466void buildList( const DeclarationNode * firstNode, std::list< Declaration * > & outputList );
     467void buildList( const DeclarationNode * firstNode, std::list< DeclarationWithType * > & outputList );
     468void buildTypeList( const DeclarationNode * firstNode, std::list< Type * > & outputList );
    469469
    470470template< typename SynTreeType, typename NodeType >
    471 void buildMoveList( const NodeType * firstNode, std::list< SynTreeType * > &outputList ) {
     471void buildMoveList( const NodeType * firstNode, std::list< SynTreeType * > & outputList ) {
    472472        buildList( firstNode, outputList );
    473473        delete firstNode;
Note: See TracChangeset for help on using the changeset viewer.