Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ParseNode.h

    rf2f512ba r47498bd  
    1010// Created On       : Sat May 16 13:28:16 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Fri Jul 20 14:56:30 2018
    13 // Update Count     : 850
     12// Last Modified On : Wed Jun  6 16:17:18 2018
     13// Update Count     : 843
    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();
    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() << std::endl;
     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;
     
    303303        bool get_extension() const { return extension; }
    304304        DeclarationNode * set_extension( bool exten ) { extension = exten; return this; }
    305 
    306         bool get_inLine() const { return inLine; }
    307         DeclarationNode * set_inLine( bool inL ) { inLine = inL; return this; }
    308305  public:
    309306        DeclarationNode * get_last() { return (DeclarationNode *)ParseNode::get_last(); }
     
    330327        StaticAssert_t assert;
    331328
    332         BuiltinType builtin = NoBuiltinType;
    333 
    334         TypeData * type = nullptr;
    335 
    336         bool inLine = false;
     329        BuiltinType builtin;
     330
     331        TypeData * type;
     332
    337333        Type::FuncSpecifiers funcSpecs;
    338334        Type::StorageClasses storageClasses;
    339335
    340         ExpressionNode * bitfieldWidth = nullptr;
     336        ExpressionNode * bitfieldWidth;
    341337        std::unique_ptr<ExpressionNode> enumeratorValue;
    342         bool hasEllipsis = false;
     338        bool hasEllipsis;
    343339        LinkageSpec::Spec linkage;
    344         Expression * asmName = nullptr;
     340        Expression * asmName;
    345341        std::list< Attribute * > attributes;
    346         InitializerNode * initializer = nullptr;
     342        InitializerNode * initializer;
    347343        bool extension = false;
    348344        std::string error;
    349         StatementNode * asmStmt = nullptr;
     345        StatementNode * asmStmt;
    350346
    351347        static UniqueName anonymous;
     
    381377        virtual StatementNode * append_last_case( StatementNode * );
    382378
    383         virtual void print( std::ostream & os, __attribute__((unused)) int indent = 0 ) const override {
     379        virtual void print( std::ostream &os, __attribute__((unused)) int indent = 0 ) const override {
    384380                os << stmt.get() << std::endl;
    385381        }
     
    439435
    440436template< typename SynTreeType, typename NodeType, template< typename, typename...> class Container, typename... Args >
    441 void buildList( const NodeType * firstNode, Container< SynTreeType *, Args... > & outputList ) {
     437void buildList( const NodeType * firstNode, Container< SynTreeType *, Args... > &outputList ) {
    442438        SemanticErrorException errors;
    443439        std::back_insert_iterator< Container< SynTreeType *, Args... > > out( outputList );
     
    453449                                assertf(false, "buildList unknown type");
    454450                        } // if
    455                 } catch( SemanticErrorException & e ) {
     451                } catch( SemanticErrorException &e ) {
    456452                        errors.append( e );
    457453                } // try
     
    464460
    465461// 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 );
     462void buildList( const DeclarationNode * firstNode, std::list< Declaration * > &outputList );
     463void buildList( const DeclarationNode * firstNode, std::list< DeclarationWithType * > &outputList );
     464void buildTypeList( const DeclarationNode * firstNode, std::list< Type * > &outputList );
    469465
    470466template< typename SynTreeType, typename NodeType >
    471 void buildMoveList( const NodeType * firstNode, std::list< SynTreeType * > & outputList ) {
     467void buildMoveList( const NodeType * firstNode, std::list< SynTreeType * > &outputList ) {
    472468        buildList( firstNode, outputList );
    473469        delete firstNode;
Note: See TracChangeset for help on using the changeset viewer.