root / trunk / compiler / cppAst / ast / statements / Break.hpp
1 | 7 | krennw | /**
|
---|---|---|---|
2 | *
|
||
3 | * OOAS Compiler - C++ AST
|
||
4 | *
|
||
5 | * Copyright 2015, AIT Austrian Institute of Technology.
|
||
6 | * All rights reserved.
|
||
7 | *
|
||
8 | * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
|
||
9 | *
|
||
10 | * If you modify the file please update the list of contributors below to in-
|
||
11 | * clude your name. Please also stick to the coding convention of using TABs
|
||
12 | * to do the basic (block-level) indentation and spaces for anything after
|
||
13 | * that. (Enable the display of special chars and it should be pretty obvious
|
||
14 | * what this means.) Also, remove all trailing whitespace.
|
||
15 | *
|
||
16 | * Contributors:
|
||
17 | * Willibald Krenn (AIT)
|
||
18 | * Stephan Zimmerer (AIT)
|
||
19 | * Christoph Czurda (AIT)
|
||
20 | *
|
||
21 | */
|
||
22 | 2 | krennw | |
23 | |||
24 | |||
25 | /*
|
||
26 | * Break.hpp
|
||
27 | *
|
||
28 | * Created on: Apr 1, 2014
|
||
29 | * Author: willibald
|
||
30 | */
|
||
31 | |||
32 | #pragma once
|
||
33 | |||
34 | #include <ast/statements/Statement.hpp> |
||
35 | #include <ast/IAstVisitor.hpp> |
||
36 | |||
37 | namespace Ast {
|
||
38 | |||
39 | class Break final |
||
40 | : public Statement
|
||
41 | { |
||
42 | protected:
|
||
43 | Break(): Statement(StatementKind::Break){}; |
||
44 | Break(const Break& toCopy): Statement(toCopy){};
|
||
45 | |||
46 | static Break* create() {return new Break();} |
||
47 | static Break* createCopy(const Break& toCopy) {return new Break(toCopy);} |
||
48 | public:
|
||
49 | friend class Ast; |
||
50 | friend class Statement; |
||
51 | void accept(IAstVisitor& visitor) override {visitor.visit(this);}; |
||
52 | }; |
||
53 | } |