Ignore:
Timestamp:
Aug 17, 2017, 3:42:21 PM (8 years ago)
Author:
Thierry Delisle <tdelisle@…>
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, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
e50e9ff
Parents:
97e3296 (diff), 21f0aa8 (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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ParseNode.h

    r97e3296 r6ac5223  
    1010// Created On       : Sat May 16 13:28:16 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Thu Aug 10 16:54:00 2017
    13 // Update Count     : 789
     12// Last Modified On : Thr Aug 17 13:46:00 2017
     13// Update Count     : 795
    1414//
    1515
    1616#pragma once
    1717
    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
     36class Attribute;
     37class Declaration;
     38class DeclarationNode;
     39class DeclarationWithType;
     40class ExpressionNode;
     41class Initializer;
    3142class StatementNode;
    32 class CompoundStmtNode;
    33 class DeclarationNode;
    34 class ExpressionNode;
    35 class InitializerNode;
    36 class Attribute;
    3743
    3844//##############################################################################
     
    371377Statement * build_expr( ExpressionNode * ctl );
    372378
     379struct 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
    373387struct ForCtl {
    374388        ForCtl( ExpressionNode * expr, ExpressionNode * condition, ExpressionNode * change ) :
     
    382396};
    383397
    384 Statement * build_if( ExpressionNode * ctl, StatementNode * then_stmt, StatementNode * else_stmt );
     398Statement * build_if( IfCtl * ctl, StatementNode * then_stmt, StatementNode * else_stmt );
    385399Statement * build_switch( ExpressionNode * ctl, StatementNode * stmt );
    386400Statement * build_case( ExpressionNode * ctl );
Note: See TracChangeset for help on using the changeset viewer.