Changeset 2514607d for src/Parser/ParseNode.h
- Timestamp:
- Jul 23, 2018, 6:00:57 PM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- e68b3a8
- Parents:
- cbdf565 (diff), c29c342 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/ParseNode.h
rcbdf565 r2514607d 10 10 // Created On : Sat May 16 13:28:16 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jun 6 16:17:18201813 // Update Count : 8 4312 // Last Modified On : Fri Jul 20 14:56:30 2018 13 // Update Count : 850 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() << 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 {} 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; } 305 308 public: 306 309 DeclarationNode * get_last() { return (DeclarationNode *)ParseNode::get_last(); } … … 327 330 StaticAssert_t assert; 328 331 329 BuiltinType builtin; 330 331 TypeData * type; 332 332 BuiltinType builtin = NoBuiltinType; 333 334 TypeData * type = nullptr; 335 336 bool inLine = false; 333 337 Type::FuncSpecifiers funcSpecs; 334 338 Type::StorageClasses storageClasses; 335 339 336 ExpressionNode * bitfieldWidth ;340 ExpressionNode * bitfieldWidth = nullptr; 337 341 std::unique_ptr<ExpressionNode> enumeratorValue; 338 bool hasEllipsis ;342 bool hasEllipsis = false; 339 343 LinkageSpec::Spec linkage; 340 Expression * asmName ;344 Expression * asmName = nullptr; 341 345 std::list< Attribute * > attributes; 342 InitializerNode * initializer ;346 InitializerNode * initializer = nullptr; 343 347 bool extension = false; 344 348 std::string error; 345 StatementNode * asmStmt ;349 StatementNode * asmStmt = nullptr; 346 350 347 351 static UniqueName anonymous; … … 377 381 virtual StatementNode * append_last_case( StatementNode * ); 378 382 379 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 { 380 384 os << stmt.get() << std::endl; 381 385 } … … 435 439 436 440 template< typename SynTreeType, typename NodeType, template< typename, typename...> class Container, typename... Args > 437 void buildList( const NodeType * firstNode, Container< SynTreeType *, Args... > & outputList ) {441 void buildList( const NodeType * firstNode, Container< SynTreeType *, Args... > & outputList ) { 438 442 SemanticErrorException errors; 439 443 std::back_insert_iterator< Container< SynTreeType *, Args... > > out( outputList ); … … 449 453 assertf(false, "buildList unknown type"); 450 454 } // if 451 } catch( SemanticErrorException & e ) {455 } catch( SemanticErrorException & e ) { 452 456 errors.append( e ); 453 457 } // try … … 460 464 461 465 // in DeclarationNode.cc 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 );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 ); 465 469 466 470 template< typename SynTreeType, typename NodeType > 467 void buildMoveList( const NodeType * firstNode, std::list< SynTreeType * > & outputList ) {471 void buildMoveList( const NodeType * firstNode, std::list< SynTreeType * > & outputList ) { 468 472 buildList( firstNode, outputList ); 469 473 delete firstNode;
Note: See TracChangeset
for help on using the changeset viewer.