Home
last modified time | relevance | path

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

/external/javaparser/javaparser-testing/src/test/java/com/github/javaparser/printer/lexicalpreservation/
DDifferenceTest.java18 import com.github.javaparser.printer.concretesyntaxmodel.CsmToken;
50 new CsmToken(GeneratedJavaParserConstants.LPAREN), in calculateDifferenceAIsEmpty()
52 new CsmToken(GeneratedJavaParserConstants.RPAREN), in calculateDifferenceAIsEmpty()
56 … assertEquals(added(new CsmToken(GeneratedJavaParserConstants.LPAREN)), diff.getElements().get(0)); in calculateDifferenceAIsEmpty()
58 … assertEquals(added(new CsmToken(GeneratedJavaParserConstants.RPAREN)), diff.getElements().get(2)); in calculateDifferenceAIsEmpty()
68 new CsmToken(GeneratedJavaParserConstants.LPAREN), in calculateDifferenceBIsEmpty()
70 new CsmToken(GeneratedJavaParserConstants.RPAREN), in calculateDifferenceBIsEmpty()
75 …assertEquals(removed(new CsmToken(GeneratedJavaParserConstants.LPAREN)), diff.getElements().get(0)… in calculateDifferenceBIsEmpty()
77 …assertEquals(removed(new CsmToken(GeneratedJavaParserConstants.RPAREN)), diff.getElements().get(2)… in calculateDifferenceBIsEmpty()
92 assertEquals(kept(new CsmToken(eolTokenKind())), diff.getElements().get(2)); in compilationUnitExampleWithPackageSetDiff()
[all …]
DLexicalDifferenceCalculatorTest.java19 import com.github.javaparser.printer.concretesyntaxmodel.CsmToken;
39 assertEquals(new CsmToken(eolTokenKind()), csmOriginal.elements.get(1)); in compilationUnitExampleOriginal()
51 assertEquals(new CsmToken(eolTokenKind()), csmChanged.elements.get(2)); in compilationUnitExampleWithPackageSet()
62 assertEquals(new CsmToken(GeneratedJavaParserConstants.AT), csm.elements.get(i++)); in annotationDeclarationModifiersExampleOriginal()
63 assertEquals(new CsmToken(GeneratedJavaParserConstants.INTERFACE), csm.elements.get(i++)); in annotationDeclarationModifiersExampleOriginal()
64 assertEquals(new CsmToken(spaceTokenKind()), csm.elements.get(i++)); in annotationDeclarationModifiersExampleOriginal()
66 assertEquals(new CsmToken(spaceTokenKind()), csm.elements.get(i++)); in annotationDeclarationModifiersExampleOriginal()
67 assertEquals(new CsmToken(GeneratedJavaParserConstants.LBRACE), csm.elements.get(i++)); in annotationDeclarationModifiersExampleOriginal()
68 assertEquals(new CsmToken(eolTokenKind()), csm.elements.get(i++)); in annotationDeclarationModifiersExampleOriginal()
70 assertEquals(new CsmToken(eolTokenKind()), csm.elements.get(i++)); in annotationDeclarationModifiersExampleOriginal()
[all …]
/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()
/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/printer/lexicalpreservation/
DDifference.java220 } else if (b instanceof CsmToken) { in matching()
229 } else if (a instanceof CsmToken) { in matching()
230 if (b instanceof CsmToken) { in matching()
231 CsmToken childA = (CsmToken)a; in matching()
232 CsmToken childB = (CsmToken)b; in matching()
260 } else if (b instanceof CsmToken) { in replacement()
265 } else if (a instanceof CsmToken) { in replacement()
266 if (b instanceof CsmToken) { in replacement()
267 CsmToken childA = (CsmToken)a; in replacement()
268 CsmToken childB = (CsmToken)b; in replacement()
[all …]
DLexicalPreservingPrinter.java40 import com.github.javaparser.printer.concretesyntaxmodel.CsmToken;
386 … if (pendingIndentation && !(element instanceof CsmToken && ((CsmToken) element).isNewLine())) {
392 } else if (element instanceof CsmToken) {
393 CsmToken csmToken = (CsmToken) element;
DLexicalDifferenceCalculator.java154 } else if (csm instanceof CsmToken) { in calculatedSyntaxModelForNode()
206 elements.add(new CsmToken(toToken(modifier))); in calculatedSyntaxModelForNode()
237 elements.add(new CsmToken(csmAttribute.getTokenType(node, value.toString()), text)); in calculatedSyntaxModelForNode()
239 elements.add(new CsmToken(GeneratedJavaParserConstants.STRING_LITERAL, in calculatedSyntaxModelForNode()