Changeset c13e8dc8 for src/Parser/ParseNode.h
- Timestamp:
- Dec 5, 2017, 2:35:03 PM (8 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- f9feab8
- Parents:
- 9c35431 (diff), 65197c2 (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
r9c35431 rc13e8dc8 69 69 70 70 virtual void print( __attribute__((unused)) std::ostream &os, __attribute__((unused)) int indent = 0 ) const {} 71 virtual void printList( __attribute__((unused)) std::ostream &os, __attribute__((unused)) int indent = 0 ) const {} 71 virtual void printList( std::ostream &os, int indent = 0 ) const { 72 print( os, indent ); 73 if ( next ) next->print( os, indent ); 74 } 72 75 73 76 static int indent_by; … … 120 123 ExpressionNode * set_extension( bool exten ) { extension = exten; return this; } 121 124 122 virtual void print( __attribute__((unused)) std::ostream &os, __attribute__((unused)) int indent = 0 ) const override {} 125 virtual void print( std::ostream &os, __attribute__((unused)) int indent = 0 ) const override { 126 os << expr.get() << std::endl; 127 } 123 128 void printOneLine( __attribute__((unused)) std::ostream &os, __attribute__((unused)) int indent = 0 ) const {} 124 129 … … 257 262 DeclarationNode * addBitfield( ExpressionNode * size ); 258 263 DeclarationNode * addVarArgs(); 259 DeclarationNode * addFunctionBody( StatementNode * body );264 DeclarationNode * addFunctionBody( StatementNode * body, StatementNode * with = nullptr ); 260 265 DeclarationNode * addOldDeclList( DeclarationNode * list ); 261 266 DeclarationNode * setBase( TypeData * newType ); … … 359 364 virtual StatementNode * append_last_case( StatementNode * ); 360 365 361 virtual void print( __attribute__((unused)) std::ostream &os, __attribute__((unused)) int indent = 0 ) const override {} 362 virtual void printList( __attribute__((unused)) std::ostream &os, __attribute__((unused)) int indent = 0 ) const override {} 366 virtual void print( std::ostream &os, __attribute__((unused)) int indent = 0 ) const override { 367 os << stmt.get() << std::endl; 368 } 363 369 private: 364 370 std::unique_ptr<Statement> stmt; … … 408 414 WaitForStmt * build_waitfor_timeout( ExpressionNode * timeout, StatementNode * stmt, ExpressionNode * when ); 409 415 WaitForStmt * build_waitfor_timeout( ExpressionNode * timeout, StatementNode * stmt, ExpressionNode * when, StatementNode * else_stmt, ExpressionNode * else_when ); 416 WithStmt * build_with( ExpressionNode * exprs, StatementNode * stmt ); 410 417 411 418 //##############################################################################
Note:
See TracChangeset
for help on using the changeset viewer.