Changes in src/Parser/ParseNode.h [21f0aa8:f196351]
- File:
-
- 1 edited
-
src/Parser/ParseNode.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/ParseNode.h
r21f0aa8 rf196351 10 10 // Created On : Sat May 16 13:28:16 2015 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Th r Aug 17 13:46:00 201713 // Update Count : 7 9512 // Last Modified On : Thu Aug 10 16:54:00 2017 13 // Update Count : 789 14 14 // 15 15 16 16 #pragma once 17 17 18 #include < algorithm> // for move19 #include < cassert> // for assert, assertf20 #include <i osfwd> // for ostream21 #include < iterator> // for back_insert_iterator22 #include <list> // for list 23 #include <memory> // for unique_ptr, pointer_traits24 #include <string> // for string25 26 #include " Common/CodeLocation.h" // for CodeLocation27 #include " Common/SemanticError.h" // for SemanticError28 #include "Common/ UniqueName.h" // for UniqueName29 #include "Common/ utility.h" // for maybeClone, maybeBuild30 #include "Parser/LinkageSpec.h" // for Spec 31 #include "SynTree/Expression.h" // for Expression, ConstantExpr (ptr only) 32 #include "SynTree/Label.h" // for Label 33 #include "SynTree/Statement.h" // for Statement, BranchStmt, BranchStmt:... 34 #include "SynTree/Type.h" // for Type, Type::FuncSpecifiers, Type::... 35 18 #include <string> 19 #include <list> 20 #include <iterator> 21 #include <memory> 22 23 #include "Parser/LinkageSpec.h" 24 #include "SynTree/Type.h" 25 #include "SynTree/Expression.h" 26 #include "SynTree/Statement.h" 27 #include "SynTree/Label.h" 28 #include "Common/utility.h" 29 #include "Common/UniqueName.h" 30 31 class StatementNode; 32 class CompoundStmtNode; 33 class DeclarationNode; 34 class ExpressionNode; 35 class InitializerNode; 36 36 class Attribute; 37 class Declaration;38 class DeclarationNode;39 class DeclarationWithType;40 class ExpressionNode;41 class Initializer;42 class StatementNode;43 37 44 38 //############################################################################## … … 377 371 Statement * build_expr( ExpressionNode * ctl ); 378 372 379 struct IfCtl {380 IfCtl( DeclarationNode * decl, ExpressionNode * condition ) :381 init( decl ? new StatementNode( decl ) : nullptr ), condition( condition ) {}382 383 StatementNode * init;384 ExpressionNode * condition;385 };386 387 373 struct ForCtl { 388 374 ForCtl( ExpressionNode * expr, ExpressionNode * condition, ExpressionNode * change ) : … … 396 382 }; 397 383 398 Statement * build_if( IfCtl* ctl, StatementNode * then_stmt, StatementNode * else_stmt );384 Statement * build_if( ExpressionNode * ctl, StatementNode * then_stmt, StatementNode * else_stmt ); 399 385 Statement * build_switch( ExpressionNode * ctl, StatementNode * stmt ); 400 386 Statement * build_case( ExpressionNode * ctl );
Note:
See TracChangeset
for help on using the changeset viewer.