Home
last modified time | relevance | path

Searched refs:CsmToken (Results 1 – 12 of 12) sorted by relevance

/external/javaparser/javaparser-core-testing/src/test/java/com/github/javaparser/printer/lexicalpreservation/
DDifferenceElementCalculatorTest.java19 import com.github.javaparser.printer.concretesyntaxmodel.CsmToken;
53 new CsmToken(GeneratedJavaParserConstants.LPAREN), in calculateDifferenceAIsEmpty()
55 new CsmToken(GeneratedJavaParserConstants.RPAREN), in calculateDifferenceAIsEmpty()
59 … assertEquals(added(new CsmToken(GeneratedJavaParserConstants.LPAREN)), differenceElements.get(0)); in calculateDifferenceAIsEmpty()
61 … assertEquals(added(new CsmToken(GeneratedJavaParserConstants.RPAREN)), differenceElements.get(2)); in calculateDifferenceAIsEmpty()
71 new CsmToken(GeneratedJavaParserConstants.LPAREN), in calculateDifferenceBIsEmpty()
73 new CsmToken(GeneratedJavaParserConstants.RPAREN), in calculateDifferenceBIsEmpty()
78 …assertEquals(removed(new CsmToken(GeneratedJavaParserConstants.LPAREN)), differenceElements.get(0)… in calculateDifferenceBIsEmpty()
80 …assertEquals(removed(new CsmToken(GeneratedJavaParserConstants.RPAREN)), differenceElements.get(2)… in calculateDifferenceBIsEmpty()
95 assertEquals(kept(new CsmToken(eolTokenKind())), differenceElements.get(2)); in compilationUnitExampleWithPackageSetDiff()
[all …]
DLexicalDifferenceCalculatorTest.java20 import com.github.javaparser.printer.concretesyntaxmodel.CsmToken;
43 assertEquals(new CsmToken(eolTokenKind()), csmOriginal.elements.get(1)); in compilationUnitExampleOriginal()
55 assertEquals(new CsmToken(eolTokenKind()), csmChanged.elements.get(2)); in compilationUnitExampleWithPackageSet()
66 assertEquals(new CsmToken(GeneratedJavaParserConstants.AT), csm.elements.get(i++)); in annotationDeclarationModifiersExampleOriginal()
67 assertEquals(new CsmToken(GeneratedJavaParserConstants.INTERFACE), csm.elements.get(i++)); in annotationDeclarationModifiersExampleOriginal()
68 assertEquals(new CsmToken(spaceTokenKind()), csm.elements.get(i++)); in annotationDeclarationModifiersExampleOriginal()
70 assertEquals(new CsmToken(spaceTokenKind()), csm.elements.get(i++)); in annotationDeclarationModifiersExampleOriginal()
71 assertEquals(new CsmToken(GeneratedJavaParserConstants.LBRACE), csm.elements.get(i++)); in annotationDeclarationModifiersExampleOriginal()
72 assertEquals(new CsmToken(eolTokenKind()), csm.elements.get(i++)); in annotationDeclarationModifiersExampleOriginal()
74 assertEquals(new CsmToken(eolTokenKind()), csm.elements.get(i++)); in annotationDeclarationModifiersExampleOriginal()
[all …]
/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/printer/lexicalpreservation/
DKept.java7 import com.github.javaparser.printer.concretesyntaxmodel.CsmToken;
44 CsmToken csmToken = (CsmToken) element; in getTokenType()
48 throw new IllegalStateException("Kept is not a " + CsmToken.class.getSimpleName()); in getTokenType()
60 public boolean isToken() { return element instanceof CsmToken; } in isToken()
75 CsmToken csmToken = (CsmToken) element; in isWhiteSpace()
84 CsmToken csmToken = (CsmToken) element; in isWhiteSpaceOrComment()
93 CsmToken csmToken = (CsmToken) element; in isNewLine()
DRemoved.java6 import com.github.javaparser.printer.concretesyntaxmodel.CsmToken;
51 CsmToken csmToken = (CsmToken) element; in getTokenType()
55 throw new IllegalStateException("Removed is not a " + CsmToken.class.getSimpleName()); in getTokenType()
63 public boolean isToken() { return element instanceof CsmToken; } in isToken()
78 CsmToken csmToken = (CsmToken) element; in isWhiteSpace()
92 CsmToken csmToken = (CsmToken) element; in isNewLine()
DDifferenceElementCalculator.java18 } else if (b instanceof CsmToken) { in matching()
27 } else if (a instanceof CsmToken) { in matching()
28 if (b instanceof CsmToken) { in matching()
29 CsmToken childA = (CsmToken)a; in matching()
30 CsmToken childB = (CsmToken)b; in matching()
58 } else if (b instanceof CsmToken) { in replacement()
63 } else if (a instanceof CsmToken) { in replacement()
64 if (b instanceof CsmToken) { in replacement()
65 CsmToken childA = (CsmToken)a; in replacement()
66 CsmToken childB = (CsmToken)b; in replacement()
[all …]
DAdded.java5 import com.github.javaparser.printer.concretesyntaxmodel.CsmToken;
57 } else if (element instanceof CsmToken) { in toTextElement()
58 …return new TokenTextElement(((CsmToken) element).getTokenType(), ((CsmToken) element).getContent(n… in toTextElement()
DRemovedGroup.java7 import com.github.javaparser.printer.concretesyntaxmodel.CsmToken;
143 CsmToken token = (CsmToken) startElement.getElement(); in hasOnlyWhitespace()
DLexicalDifferenceCalculator.java155 } else if (csm instanceof CsmToken) { in calculatedSyntaxModelForNode()
207 elements.add(new CsmToken(toToken(modifier))); in calculatedSyntaxModelForNode()
238 … elements.add(new CsmToken(csmAttribute.getTokenType(node, value.toString(), text), text)); in calculatedSyntaxModelForNode()
240 elements.add(new CsmToken(GeneratedJavaParserConstants.STRING_LITERAL, in calculatedSyntaxModelForNode()
DDifference.java14 import com.github.javaparser.printer.concretesyntaxmodel.CsmToken;
725 if (csmElement instanceof CsmToken) { in isCorrespondingElement()
726 CsmToken csmToken = (CsmToken)csmElement; in isCorrespondingElement()
748 …return textElement.isWhiteSpace() && csmElement instanceof CsmToken && ((CsmToken)csmElement).isWh… in isAlmostCorrespondingElement()
DLexicalPreservingPrinter.java477 … if (pendingIndentation && !(element instanceof CsmToken && ((CsmToken) element).isNewLine())) { in interpret()
483 } else if (element instanceof CsmToken) { in interpret()
484 CsmToken csmToken = (CsmToken) element; in interpret()
/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/printer/concretesyntaxmodel/
DCsmElement.java52 return new CsmToken(tokenType, content); in string()
56 return new CsmToken(tokenType); in string()
68 return new CsmToken(tokenType); in token()
71 static CsmElement token(int tokenType, CsmToken.TokenContentCalculator tokenContentCalculator) { in token()
72 return new CsmToken(tokenType, tokenContentCalculator); in token()
88 return new CsmToken(spaceTokenKind(), " "); in space()
92 return new CsmToken(GeneratedJavaParserConstants.SEMICOLON); in semicolon()
98 return new CsmToken(eolTokenKind(), EOL); in newline()
106 return new CsmToken(GeneratedJavaParserConstants.COMMA); in comma()
DCsmToken.java33 public class CsmToken implements CsmElement { class
53 public CsmToken(int tokenType) { in CsmToken() method in CsmToken
66 public CsmToken(int tokenType, String content) { in CsmToken() method in CsmToken
71 public CsmToken(int tokenType, TokenContentCalculator tokenContentCalculator) { in CsmToken() method in CsmToken
95 CsmToken csmToken = (CsmToken) o; in equals()