Home
last modified time | relevance | path

Searched refs:nodeText (Results 1 – 11 of 11) sorted by relevance

/external/javaparser/javaparser-testing/src/test/java/com/github/javaparser/printer/lexicalpreservation/
DLexicalPreservingPrinterTest.java66 NodeText nodeText = LexicalPreservingPrinter.getOrCreateNodeText(fd); in checkNodeTextCreatedForField() local
68nodeText.getElements().stream().map(TextElement::expand).collect(Collectors.toList())); in checkNodeTextCreatedForField()
79 NodeText nodeText = LexicalPreservingPrinter.getOrCreateNodeText(vd); in checkNodeTextCreatedForVariableDeclarator() local
81nodeText.getElements().stream().map(TextElement::expand).collect(Collectors.toList())); in checkNodeTextCreatedForVariableDeclarator()
91 NodeText nodeText = LexicalPreservingPrinter.getOrCreateNodeText(md); in checkNodeTextCreatedForMethod() local
93nodeText.getElements().stream().map(TextElement::expand).collect(Collectors.toList())); in checkNodeTextCreatedForMethod()
104 NodeText nodeText = LexicalPreservingPrinter.getOrCreateNodeText(p1); in checkNodeTextCreatedForMethodParameter() local
106nodeText.getElements().stream().map(TextElement::expand).collect(Collectors.toList())); in checkNodeTextCreatedForMethodParameter()
118 NodeText nodeText = LexicalPreservingPrinter.getOrCreateNodeText(t); in checkNodeTextCreatedForPrimitiveType() local
120nodeText.getElements().stream().map(TextElement::expand).collect(Collectors.toList())); in checkNodeTextCreatedForPrimitiveType()
[all …]
/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/printer/lexicalpreservation/
DDifference.java436 private int considerCleaningTheLine(NodeText nodeText, int nodeTextIndex) { in considerCleaningTheLine() argument
437 …while (nodeTextIndex >=1 && nodeText.getElements().get(nodeTextIndex - 1).isWhiteSpace() && !nodeT… in considerCleaningTheLine()
438 nodeText.removeElement(nodeTextIndex - 1); in considerCleaningTheLine()
444 private boolean isAfterLBrace(NodeText nodeText, int nodeTextIndex) { in isAfterLBrace() argument
445 if (nodeTextIndex > 0 && nodeText.getElements().get(nodeTextIndex - 1).isToken(LBRACE)) { in isAfterLBrace()
448 …if (nodeTextIndex > 0 && nodeText.getElements().get(nodeTextIndex - 1).isWhiteSpace() && !nodeText in isAfterLBrace()
449 return isAfterLBrace(nodeText, nodeTextIndex - 1); in isAfterLBrace()
458 private int considerEnforcingIndentation(NodeText nodeText, int nodeTextIndex) { in considerEnforcingIndentation() argument
460 … for (int i=nodeTextIndex; i >= 0 && hasOnlyWsBefore && i < nodeText.getElements().size(); i--) { in considerEnforcingIndentation()
461 if (nodeText.getElements().get(i).isNewline()) { in considerEnforcingIndentation()
[all …]
DLexicalPreservingPrinter.java146 NodeText nodeText = getOrCreateNodeText(observedNode.getParentNode().get()); in createObserver()
149 int index = nodeText.findChild(observedNode); in createObserver()
150 nodeText.addChild(index, (Comment) newValue); in createObserver()
151 nodeText.addToken(index + 1, eolTokenKind(), Utils.EOL); in createObserver()
155 …List<TokenTextElement> matchingTokens = nodeText.getElements().stream().filter(e -> e.isToken(JAVA… in createObserver()
160 int index = nodeText.findElement(matchingTokens.get(0)); in createObserver()
161 nodeText.removeElement(index); in createObserver()
162 if (nodeText.getElements().get(index).isNewline()) { in createObserver()
163 nodeText.removeElement(index); in createObserver()
171 …List<TokenTextElement> matchingTokens = nodeText.getElements().stream().filter(e -> e.isToken(JAVA… in createObserver()
[all …]
DTextElementIteratorsFactory.java159 private static Iterator<TokenTextElement> reverseIterator(NodeText nodeText, int index) { in reverseIterator() argument
160 TextElement textElement = nodeText.getTextElement(index); in reverseIterator()
165 nodeText.removeElement(index); in reverseIterator()
177 public static Iterator<TokenTextElement> reverseIterator(NodeText nodeText) {
178 return partialReverseIterator(nodeText, nodeText.numberOfElements() - 1);
181 …public static Iterator<TokenTextElement> partialReverseIterator(NodeText nodeText, int fromIndex) {
184 elements.add(reverseIterator(nodeText, i));
DLexicalDifferenceCalculator.java113 …public void calculatePropertyChange(NodeText nodeText, Node observedNode, ObservableProperty prope… in calculatePropertyChange() argument
114 if (nodeText == null) { in calculatePropertyChange()
121 difference.apply(nodeText, observedNode); in calculatePropertyChange()
/external/antlr/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime.Tree/
DParseTree.cs113 string nodeText = this.ToString(); in ToStringWithHiddenTokens()
114 if (!nodeText.Equals("<EOF>")) in ToStringWithHiddenTokens()
115 buf.Append(nodeText); in ToStringWithHiddenTokens()
/external/antlr/runtime/CSharp3/Sources/Antlr3.Runtime/Tree/
DParseTree.cs135 string nodeText = this.ToString(); in ToStringWithHiddenTokens()
136 if ( !nodeText.Equals( "<EOF>" ) ) in ToStringWithHiddenTokens()
137 buf.Append( nodeText ); in ToStringWithHiddenTokens()
/external/antlr/runtime/Java/src/main/java/org/antlr/runtime/tree/
DParseTree.java103 String nodeText = this.toString(); in toStringWithHiddenTokens() local
104 if ( !nodeText.equals("<EOF>") ) buf.append(nodeText); in toStringWithHiddenTokens()
/external/antlr/runtime/ObjC/Framework/
DParseTree.m116 NSString *nodeText = [self toString];
117 if ( ![nodeText isEqualTo:@"<EOF>"] )
118 [buf appendString:nodeText];
/external/antlr/runtime/CSharp2/Sources/Antlr3.Runtime/Antlr.Runtime/
DBaseRecognizer.cs290 … string nodeText = (mtne.Node != null) ? mtne.Node.ToString() ?? string.Empty : string.Empty; in GetErrorMessage()
291 msg = "mismatched tree node: " + nodeText + " expecting " + tokenName; in GetErrorMessage()
/external/antlr/runtime/CSharp3/Sources/Antlr3.Runtime/
DBaseRecognizer.cs335 … string nodeText = ( mtne.Node != null ) ? mtne.Node.ToString() ?? string.Empty : string.Empty; in GetErrorMessage()
336 msg = "mismatched tree node: " + nodeText + " expecting " + tokenName; in GetErrorMessage()