Changes in src/Parser/ParseNode.h [f196351:21f0aa8]
- File:
-
- 1 edited
-
src/Parser/ParseNode.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/ParseNode.h
rf196351 r21f0aa8 10 10 // Created On : Sat May 16 13:28:16 2015 11 11 // Last Modified By : Andrew Beach 12 // Last Modified On : Th u Aug 10 16:54:00 201713 // Update Count : 7 8912 // Last Modified On : Thr Aug 17 13:46:00 2017 13 // Update Count : 795 14 14 // 15 15 16 16 #pragma once 17 17 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 18 #include <algorithm> // for move 19 #include <cassert> // for assert, assertf 20 #include <iosfwd> // for ostream 21 #include <iterator> // for back_insert_iterator 22 #include <list> // for list 23 #include <memory> // for unique_ptr, pointer_traits 24 #include <string> // for string 25 26 #include "Common/CodeLocation.h" // for CodeLocation 27 #include "Common/SemanticError.h" // for SemanticError 28 #include "Common/UniqueName.h" // for UniqueName 29 #include "Common/utility.h" // for maybeClone, maybeBuild 30 #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 36 class Attribute; 37 class Declaration; 38 class DeclarationNode; 39 class DeclarationWithType; 40 class ExpressionNode; 41 class Initializer; 31 42 class StatementNode; 32 class CompoundStmtNode;33 class DeclarationNode;34 class ExpressionNode;35 class InitializerNode;36 class Attribute;37 43 38 44 //############################################################################## … … 371 377 Statement * build_expr( ExpressionNode * ctl ); 372 378 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 373 387 struct ForCtl { 374 388 ForCtl( ExpressionNode * expr, ExpressionNode * condition, ExpressionNode * change ) : … … 382 396 }; 383 397 384 Statement * build_if( ExpressionNode* ctl, StatementNode * then_stmt, StatementNode * else_stmt );398 Statement * build_if( IfCtl * ctl, StatementNode * then_stmt, StatementNode * else_stmt ); 385 399 Statement * build_switch( ExpressionNode * ctl, StatementNode * stmt ); 386 400 Statement * build_case( ExpressionNode * ctl );
Note:
See TracChangeset
for help on using the changeset viewer.