KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > polyglot > ext > jl > ast > Empty_c


1 package polyglot.ext.jl.ast;
2
3 import polyglot.ast.*;
4 import polyglot.types.*;
5 import polyglot.visit.*;
6 import polyglot.util.*;
7 import java.util.*;
8
9 /**
10  * <code>Empty</code> is the class for a empty statement <code>(;)</code>.
11  */

12 public class Empty_c extends Stmt_c implements Empty
13 {
14     public Empty_c(Position pos) {
15     super(pos);
16     }
17
18     /** Write the statement to an output file. */
19     public void prettyPrint(CodeWriter w, PrettyPrinter tr) {
20     w.write(";");
21     }
22
23     /**
24      * Return the first (sub)term performed when evaluating this
25      * term.
26      */

27     public Term entry() {
28         return this;
29     }
30
31     /**
32      * Visit this term in evaluation order.
33      */

34     public List acceptCFG(CFGBuilder v, List succs) {
35         return succs;
36     }
37
38     public String JavaDoc toString() {
39     return ";";
40     }
41 }
42
Popular Tags