1 2 package net.sourceforge.pmd.ast; 3 4 7 8 public class Token { 9 10 15 public int kind; 16 17 22 public int beginLine, beginColumn, endLine, endColumn; 23 24 27 public String image; 28 29 37 public Token next; 38 39 51 public Token specialToken; 52 53 56 public String toString() { 57 return image; 58 } 59 60 72 public static final Token newToken(int ofKind) { 73 switch (ofKind) { 74 default : 75 return new Token(); 76 case JavaParserConstants.RUNSIGNEDSHIFT: 77 case JavaParserConstants.RSIGNEDSHIFT: 78 case JavaParserConstants.GT: 79 return new GTToken(); 80 } 81 } 82 83 public static class GTToken extends Token { 84 int realKind = JavaParserConstants.GT; 85 } 86 87 88 } 89 | Popular Tags |