Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ParseNode.h

    r21f0aa8 rf196351  
    1010// Created On       : Sat May 16 13:28:16 2015
    1111// Last Modified By : Andrew Beach
    12 // Last Modified On : Thr Aug 17 13:46:00 2017
    13 // Update Count     : 795
     12// Last Modified On : Thu Aug 10 16:54:00 2017
     13// Update Count     : 789
    1414//
    1515
    1616#pragma once
    1717
    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 
     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
     31class StatementNode;
     32class CompoundStmtNode;
     33class DeclarationNode;
     34class ExpressionNode;
     35class InitializerNode;
    3636class Attribute;
    37 class Declaration;
    38 class DeclarationNode;
    39 class DeclarationWithType;
    40 class ExpressionNode;
    41 class Initializer;
    42 class StatementNode;
    4337
    4438//##############################################################################
     
    377371Statement * build_expr( ExpressionNode * ctl );
    378372
    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 
    387373struct ForCtl {
    388374        ForCtl( ExpressionNode * expr, ExpressionNode * condition, ExpressionNode * change ) :
     
    396382};
    397383
    398 Statement * build_if( IfCtl * ctl, StatementNode * then_stmt, StatementNode * else_stmt );
     384Statement * build_if( ExpressionNode * ctl, StatementNode * then_stmt, StatementNode * else_stmt );
    399385Statement * build_switch( ExpressionNode * ctl, StatementNode * stmt );
    400386Statement * build_case( ExpressionNode * ctl );
Note: See TracChangeset for help on using the changeset viewer.