Skip to content

Commit b2a4070

Browse files
committed
clean up
1 parent 0a56ec1 commit b2a4070

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

java/src/org/antlr/codebuff/CollectFeatures.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -480,14 +480,12 @@ public static int getDeltaToAncestor(ParserRuleContext node, ParserRuleContext a
480480
}
481481

482482
public static ParserRuleContext getAncestor(ParserRuleContext node, int delta) {
483-
System.out.print(node.getText()+" "+JavaParser.ruleNames[node.getRuleIndex()]+"+"+delta);
484483
int n = 0;
485484
ParserRuleContext p = node;
486485
while ( p!=null && n!=delta ) {
487486
n++;
488487
p = p.getParent();
489488
}
490-
System.out.println(" is "+JavaParser.ruleNames[p.getRuleIndex()]+":"+p.getAltNumber());
491489
return p;
492490
}
493491

@@ -916,14 +914,6 @@ public static ParserRuleContext getParent(ParserRuleContext p) {
916914
if ( lastValidParent==null ) return null; // must have hit the root
917915

918916
return parentClosure(p.getParent());
919-
//
920-
// // now try to walk chain rules starting with the parent of the usual parent
921-
// ParserRuleContext q = lastValidParent.getParent();
922-
// while ( q!=null && q.getChildCount()==1 ) { // while is a chain rule
923-
// lastValidParent = q;
924-
// q = q.getParent();
925-
// }
926-
// return lastValidParent;
927917
}
928918

929919
// try to walk chain rules starting with the parent of the usual parent

0 commit comments

Comments
 (0)