| JBreakStatement.java |
1 // Copyright 2012- Bill Campbell, Swami Iyer and Bahar Akbal-Delibas
2
3 package jminusminus;
4
5 import static jminusminus.CLConstants.*;
6
7 /**
8 * An AST node for a break-statement.
9 */
10 public class JBreakStatement extends JStatement {
11 /**
12 * Constructs an AST node for a break-statement.
13 *
14 * @param line line in which the break-statement occurs in the source file.
15 */
16 public JBreakStatement(int line) {
17 super(line);
18 }
19
20 /**
21 * {@inheritDoc}
22 */
23 public JStatement analyze(Context context) {
24 // TODO
25 return this;
26 }
27
28 /**
29 * {@inheritDoc}
30 */
31 public void codegen(CLEmitter output) {
32 // TODO
33 }
34
35 /**
36 * {@inheritDoc}
37 */
38 public void toJSON(JSONElement json) {
39 JSONElement e = new JSONElement();
40 json.addChild("JBreakStatement:" + line, e);
41 }
42 }
43