Changeset 1e97287 for src/AST/Stmt.cpp


Ignore:
Timestamp:
May 15, 2019, 4:04:26 PM (3 years ago)
Author:
Andrew Beach <ajbeach@…>
Branches:
arm-eh, cleanup-dtors, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
89c2f7c9
Parents:
23f99e1
Message:

Re-created the statement section of the AST.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/AST/Stmt.cpp

    r23f99e1 r1e97287  
    88//
    99// Author           : Aaron B. Moss
    10 // Created On       : Wed May 8 13:00:00 2019
    11 // Last Modified By : Aaron B. Moss
    12 // Last Modified On : Wed May 8 13:00:00 2019
    13 // Update Count     : 1
     10// Created On       : Wed May  8 13:00:00 2019
     11// Last Modified By : Andrew Beach
     12// Last Modified On : Wed May 15 15:53:00 2019
     13// Update Count     : 2
    1414//
    1515
     
    1818#include "DeclReplacer.hpp"
    1919
     20namespace ast {
     21
    2022// --- CompoundStmt
     23CompoundStmt::CompoundStmt( const CompoundStmt& o ) : Stmt(o), kids(o.kids) {
     24        assert(!"implemented");
     25}
    2126
    22 namespace ast {
    23         CompoundStmt::CompoundStmt( const CompoundStmt& o ) : Stmt(o), kids(o.kids) {
    24                 assert(!"implemented");
    25         }
     27// --- BranchStmt
     28BranchStmt( const CodeLocation& loc, Kind kind, Label target, std::vector<Label>&& labels )
     29: Stmt(loc, std::move(labels)), originalTarget(target), target(target), kind(kind) {
     30        // Make sure a syntax error hasn't slipped through.
     31        assert( Goto != kind || !target.empty() );
     32}
     33
     34const char * BranchStmt::kindNames[] = {
     35    "Goto", "Break", "Continue", "FallThrough", "FallThroughDefault"
     36}
     37
    2638}
    2739
Note: See TracChangeset for help on using the changeset viewer.