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