/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/ |
D | TokenRange.java | 11 public class TokenRange implements Iterable<JavaToken> { 12 public static final TokenRange INVALID = new TokenRange(JavaToken.INVALID, JavaToken.INVALID); 14 private final JavaToken begin; 15 private final JavaToken end; 17 public TokenRange(JavaToken begin, JavaToken end) { in TokenRange() 22 public JavaToken getBegin() { in getBegin() 26 public JavaToken getEnd() { in getEnd() 37 public TokenRange withBegin(JavaToken begin) { in withBegin() 41 public TokenRange withEnd(JavaToken end) { in withEnd() 48 for(JavaToken t: this) { in toString() [all …]
|
D | JavaToken.java | 35 public class JavaToken { class 37 public static final JavaToken INVALID = new JavaToken(); 45 private JavaToken previousToken = null; 47 private JavaToken nextToken = null; 49 private JavaToken() { in JavaToken() method in JavaToken 53 public JavaToken(int kind, String text) { in JavaToken() method in JavaToken 57 JavaToken(Token token, List<JavaToken> tokens) { in JavaToken() method in JavaToken 99 final JavaToken previousToken = tokens.get(tokens.size() - 1); in JavaToken() 110 public JavaToken(int kind) { in JavaToken() method in JavaToken 124 …public JavaToken(Range range, int kind, String text, JavaToken previousToken, JavaToken nextToken)… in JavaToken() method in JavaToken [all …]
|
D | TokenTypes.java | 57 public static JavaToken.Category getCategory(int kind) { in getCategory() 62 return JavaToken.Category.EOL; in getCategory() 66 return JavaToken.Category.WHITESPACE_NO_EOL; in getCategory() 70 return JavaToken.Category.COMMENT; in getCategory() 134 return JavaToken.Category.KEYWORD; in getCategory() 148 return JavaToken.Category.LITERAL; in getCategory() 150 return JavaToken.Category.IDENTIFIER; in getCategory() 161 return JavaToken.Category.SEPARATOR; in getCategory() 202 return JavaToken.Category.OPERATOR; in getCategory()
|
/external/javaparser/javaparser-core-testing/src/test/java/com/github/javaparser/ |
D | JavaTokenTest.java | 30 import static com.github.javaparser.JavaToken.Category.*; 40 Iterator<JavaToken> iterator = result.getResult().get().getTokenRange().get().iterator(); in testAFewTokens() 51 …te void assertToken(String image, Range range, int kind, JavaToken.Category category, JavaToken to… in assertToken() 63 assertEquals("=", new JavaToken(ASSIGN).getText()); in testAFewImagesForTokenKinds() 65 assertEquals(" ", new JavaToken(EOF).getText()); in testAFewImagesForTokenKinds() 66 assertEquals("*/", new JavaToken(JAVADOC_COMMENT).getText()); in testAFewImagesForTokenKinds() 71 JavaToken.Kind kind = JavaToken.Kind.valueOf(GeneratedJavaParserConstants.ASSERT); in testKindEnum() 73 assertEquals(JavaToken.Kind.ASSERT, kind); in testKindEnum()
|
D | TokenRangeTest.java | 26 tokenRange.getBegin().insertAfter(new JavaToken(1, "feif")); in renumberRangesWorks() 27 …ge.getBegin().getNextToken().get().getNextToken().get().insert(new JavaToken(JavaToken.Kind.WINDOW… in renumberRangesWorks() 37 Optional<JavaToken> token = node.getTokenRange().map(TokenRange::getBegin); in makeRangesString()
|
/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/printer/lexicalpreservation/ |
D | TokenTextElement.java | 24 import com.github.javaparser.JavaToken; 31 private final JavaToken token; 33 TokenTextElement(JavaToken token) { in TokenTextElement() 38 this(new JavaToken(tokenKind, text)); in TokenTextElement() 42 this(new JavaToken(tokenKind)); in TokenTextElement() 59 public JavaToken getToken() { in getToken()
|
D | RemovedGroup.java | 3 import com.github.javaparser.JavaToken; 127 …private final Function<JavaToken, Boolean> hasOnlyWhitespaceJavaTokenInFrontFunction = begin -> ha… 128 …private final Function<JavaToken, Boolean> hasOnlyWhitespaceJavaTokenBehindFunction = end -> hasOn… 151 …rivate boolean hasOnlyWhiteSpaceForTokenFunction(JavaToken token, Function<JavaToken, Optional<Jav… in hasOnlyWhiteSpaceForTokenFunction() argument 152 Optional<JavaToken> tokenResult = tokenFunction.apply(token); in hasOnlyWhiteSpaceForTokenFunction() 183 JavaToken begin = tokenRange.get().getBegin(); in getIndentation() 186 Optional<JavaToken> previousToken = begin.getPreviousToken(); in getIndentation()
|
D | LexicalPreservingPrinter.java | 288 Map<Node, List<JavaToken>> tokensByNode = new IdentityHashMap<>(); in storeInitialText() 293 for (JavaToken token : root.getTokenRange().get()) { in storeInitialText() 333 private static void storeInitialTextForOneNode(Node node, List<JavaToken> nodeTokens) { in storeInitialTextForOneNode() 346 for (JavaToken token : nodeTokens) { in storeInitialTextForOneNode()
|
/external/javaparser/javaparser-core/src/main/javacc-support/com/github/javaparser/ |
D | GeneratedJavaParserBase.java | 32 abstract JavaToken token(); in token() 55 public List<JavaToken> getTokens() { in getTokens() 81 TokenRange range(JavaToken begin, JavaToken end) { in range() 91 TokenRange range(Node begin, JavaToken end) { in range() 101 TokenRange range(JavaToken begin, Node end) { in range() 121 JavaToken orIfInvalid(JavaToken firstChoice, JavaToken secondChoice) { in orIfInvalid() 136 JavaToken orIfInvalid(JavaToken firstChoice, Node secondChoice) { in orIfInvalid() 146 JavaToken nodeListBegin(NodeList<?> l) { in nodeListBegin() 148 return JavaToken.INVALID; in nodeListBegin() 167 JavaToken begin = null; in recover() [all …]
|
D | RangedList.java | 12 TokenRange range = new TokenRange(JavaToken.INVALID, JavaToken.INVALID); 19 void beginAt(JavaToken begin) { in beginAt() 23 void endAt(JavaToken end) { in endAt()
|
D | ModifierHolder.java | 15 final JavaToken begin; 17 …ModifierHolder(JavaToken begin, NodeList<Modifier> modifiers, NodeList<AnnotationExpr> annotations… in ModifierHolder()
|
D | TokenBase.java | 17 JavaToken javaToken = null;
|
D | GeneratedJavaParserTokenManagerBase.java | 18 JavaToken javaToken = token.javaToken; in tokenRange()
|
/external/javaparser/javaparser-core/src/main/javacc/ |
D | java.jj | 62 import static com.github.javaparser.JavaToken.INVALID; 76 JavaToken token() { 107 private List<JavaToken> tokens = new ArrayList<JavaToken>(); 109 private JavaToken homeToken; 114 tokens = new ArrayList<JavaToken>(); 119 List<JavaToken> getTokens() { 131 JavaToken getHomeToken() { 150 token.javaToken = new JavaToken(token, tokens); 658 JavaToken begin; 672 JavaToken begin; [all …]
|
/external/javaparser/javaparser-core-serialization/src/main/java/com/github/javaparser/serialization/ |
D | JavaParserJsonDeserializer.java | 165 JavaToken begin = readToken( in readTokenRange() 168 JavaToken end = readToken( in readTokenRange() 177 protected JavaToken readToken(String name, JsonObject jsonObject) { in readToken() 179 return new JavaToken( in readToken()
|
D | JavaParserJsonSerializer.java | 23 import com.github.javaparser.JavaToken; 134 protected void writeToken(String name, JavaToken token, JsonGenerator generator) { in writeToken()
|
/external/javaparser/javaparser-core/generated-sources/javacc/com/github/javaparser/ |
D | GeneratedJavaParser.java | 34 import static com.github.javaparser.JavaToken.INVALID; 48 JavaToken token() { in token() 215 JavaToken begin; in PackageDeclaration() 227 JavaToken begin; in ImportDeclaration() 262 ModifierHolder Modifiers() throws ParseException {JavaToken begin = INVALID; in Modifiers() 363 JavaToken begin = modifier.begin; in ClassOrInterfaceDeclaration() 465 JavaToken begin = modifier.begin; in EnumDeclaration() 642 JavaToken begin = INVALID; in EnumConstantDeclaration() 717 JavaToken begin; in TypeParameter() 996 JavaToken begin = orIfInvalid(modifier.begin, partialType); in FieldDeclaration() [all …]
|
D | GeneratedJavaParserTokenManager.java | 34 import static com.github.javaparser.JavaToken.INVALID; 47 private List<JavaToken> tokens = new ArrayList<JavaToken>(); 49 private JavaToken homeToken; 54 tokens = new ArrayList<JavaToken>(); in reset() 59 List<JavaToken> getTokens() { in getTokens() 71 JavaToken getHomeToken() { in getHomeToken() 90 token.javaToken = new JavaToken(token, tokens); in CommonTokenAction()
|
/external/javaparser/javaparser-core-testing/src/test/java/com/github/javaparser/modules/ |
D | ModuleDeclarationTest.java | 36 …JavaToken moduleToken = cu.getClassByName("module").get().getName().getTokenRange().get().getBegin… in moduleInfoKeywordsAreSeenAsIdentifiers()
|
/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/ast/ |
D | CompilationUnit.java | 53 import static com.github.javaparser.JavaToken.Kind.EOF; 593 for (JavaToken t : getTokenRange().get()) { in recalculatePositions()
|
/external/javaparser/ |
D | changelog.md | 387 * To avoid using the int type for token kinds, use the new `JavaToken.Kind` enum. 519 * The token list is now mutable - see methods on `JavaToken`. 526 * You can now ask a `JavaToken` for its category, which is useful for examining the token list or d…
|