public static void checkNodeSourceRange(ASTNode node, final String fullSource) {
assertTrue(node.hasSourceRangeInfo());
assertTrue(node.getStartPos() <= fullSource.length() && node.getEndPos() <= fullSource.length());
// Check consistency of source ranges (no overlapping ranges)
new ASTSourceRangeChecker(node) {
@Override
public boolean visitChildrenAfterPreVisitOk() {
return depth < 2;
}