source: src/AST/Stmt.cpp @ 1e97287

arm-ehcleanup-dtorsjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-expr
Last change on this file since 1e97287 was 1e97287, checked in by Andrew Beach <ajbeach@…>, 3 years ago

Re-created the statement section of the AST.

  • Property mode set to 100644
File size: 1.1 KB
Line 
1//
2// Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
3//
4// The contents of this file are covered under the licence agreement in the
5// file "LICENCE" distributed with Cforall.
6//
7// Stmt.cpp --
8//
9// Author           : Aaron B. Moss
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
14//
15
16#include "Stmt.hpp"
17
18#include "DeclReplacer.hpp"
19
20namespace ast {
21
22// --- CompoundStmt
23CompoundStmt::CompoundStmt( const CompoundStmt& o ) : Stmt(o), kids(o.kids) {
24        assert(!"implemented");
25}
26
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
38}
39
40// Local Variables: //
41// tab-width: 4 //
42// mode: c++ //
43// compile-command: "make install" //
44// End: //
Note: See TracBrowser for help on using the repository browser.