1 22 23 package org.javacc.jjtree; 24 25 26 public class ASTCompilationUnit extends SimpleNode { 27 ASTCompilationUnit(int id) { 28 super(id); 29 } 30 31 32 public void print(IO io) 33 { 34 Token t = getFirstToken(); 35 36 while (true) { 37 if (t == JJTreeGlobals.parserImplements) { 38 if (t.image.equals("implements")) { 39 print(t, io); 40 openJJTreeComment(io, null); 41 io.getOut().print(" " + NodeFiles.nodeConstants() + ", "); 42 closeJJTreeComment(io); 43 } else { 44 openJJTreeComment(io, null); 46 io.getOut().print("implements " + NodeFiles.nodeConstants()); 47 closeJJTreeComment(io); 48 print(t, io); 49 } 50 } else { 51 print(t, io); 52 } 53 if (t == JJTreeGlobals.parserClassBodyStart) { 54 openJJTreeComment(io, null); 55 JJTreeState.insertParserMembers(io); 56 closeJJTreeComment(io); 57 } 58 59 if (t == getLastToken()) { 60 return; 61 } 62 t = t.next; 63 } 64 } 65 66 } 67 68 69 | Popular Tags |