1
3 package jminusminus;
4
5 import static jminusminus.CLConstants.*;
6
7
10 class JThrowStatement extends JStatement {
11 private JExpression expr;
13
14
20 public JThrowStatement(int line, JExpression expr) {
21 super(line);
22 this.expr = expr;
23 }
24
25
28 public JStatement analyze(Context context) {
29 return this;
31 }
32
33
36 public void codegen(CLEmitter output) {
37 }
39
40
43 public void toJSON(JSONElement json) {
44 JSONElement e = new JSONElement();
45 json.addChild("JThrowStatement:" + line, e);
46 JSONElement e1 = new JSONElement();
47 e.addChild("Expression", e1);
48 expr.toJSON(e1);
49 }
50 }
51