Changes in src/Parser/ParseNode.h [f2f512ba:47498bd]
- File:
-
- 1 edited
-
src/Parser/ParseNode.h (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/ParseNode.h
rf2f512ba r47498bd 10 10 // Created On : Sat May 16 13:28:16 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jul 20 14:56:30201813 // Update Count : 8 5012 // Last Modified On : Wed Jun 6 16:17:18 2018 13 // Update Count : 843 14 14 // 15 15 … … 68 68 } 69 69 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 { 72 72 print( os, indent ); 73 73 if ( next ) next->print( os, indent ); … … 103 103 InitializerNode * next_init() const { return kids; } 104 104 105 void print( std::ostream & os, int indent = 0 ) const;105 void print( std::ostream &os, int indent = 0 ) const; 106 106 void printOneLine( std::ostream & ) const; 107 107 … … 127 127 ExpressionNode * set_extension( bool exten ) { extension = exten; return this; } 128 128 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 {} 133 133 134 134 template<typename T> … … 290 290 } 291 291 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; 294 294 295 295 Declaration * build() const; … … 303 303 bool get_extension() const { return extension; } 304 304 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; }308 305 public: 309 306 DeclarationNode * get_last() { return (DeclarationNode *)ParseNode::get_last(); } … … 330 327 StaticAssert_t assert; 331 328 332 BuiltinType builtin = NoBuiltinType; 333 334 TypeData * type = nullptr; 335 336 bool inLine = false; 329 BuiltinType builtin; 330 331 TypeData * type; 332 337 333 Type::FuncSpecifiers funcSpecs; 338 334 Type::StorageClasses storageClasses; 339 335 340 ExpressionNode * bitfieldWidth = nullptr;336 ExpressionNode * bitfieldWidth; 341 337 std::unique_ptr<ExpressionNode> enumeratorValue; 342 bool hasEllipsis = false;338 bool hasEllipsis; 343 339 LinkageSpec::Spec linkage; 344 Expression * asmName = nullptr;340 Expression * asmName; 345 341 std::list< Attribute * > attributes; 346 InitializerNode * initializer = nullptr;342 InitializerNode * initializer; 347 343 bool extension = false; 348 344 std::string error; 349 StatementNode * asmStmt = nullptr;345 StatementNode * asmStmt; 350 346 351 347 static UniqueName anonymous; … … 381 377 virtual StatementNode * append_last_case( StatementNode * ); 382 378 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 { 384 380 os << stmt.get() << std::endl; 385 381 } … … 439 435 440 436 template< typename SynTreeType, typename NodeType, template< typename, typename...> class Container, typename... Args > 441 void buildList( const NodeType * firstNode, Container< SynTreeType *, Args... > & outputList ) {437 void buildList( const NodeType * firstNode, Container< SynTreeType *, Args... > &outputList ) { 442 438 SemanticErrorException errors; 443 439 std::back_insert_iterator< Container< SynTreeType *, Args... > > out( outputList ); … … 453 449 assertf(false, "buildList unknown type"); 454 450 } // if 455 } catch( SemanticErrorException & e ) {451 } catch( SemanticErrorException &e ) { 456 452 errors.append( e ); 457 453 } // try … … 464 460 465 461 // 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 );462 void buildList( const DeclarationNode * firstNode, std::list< Declaration * > &outputList ); 463 void buildList( const DeclarationNode * firstNode, std::list< DeclarationWithType * > &outputList ); 464 void buildTypeList( const DeclarationNode * firstNode, std::list< Type * > &outputList ); 469 465 470 466 template< typename SynTreeType, typename NodeType > 471 void buildMoveList( const NodeType * firstNode, std::list< SynTreeType * > & outputList ) {467 void buildMoveList( const NodeType * firstNode, std::list< SynTreeType * > &outputList ) { 472 468 buildList( firstNode, outputList ); 473 469 delete firstNode;
Note:
See TracChangeset
for help on using the changeset viewer.