int next= (i < lastChild) ? ((ASTNode) children.get(i + 1)).getStartPosition() : lastPos; ISourceRange range= ASTNodes.getNodeRangeWithComments(curr, prev, next, scanner); curr.setProperty(NODE_RANGE_PROPERTY, range); doExtraRangesForChildren(curr, scanner); prev= range.getOffset() + range.getLength();
if (curr.getStartPosition() != -1) { int beginOfNext= getNextExistingOffset(children, i, lastPos); endOfLast= annotateNode(curr, endOfLast, beginOfNext, scanner); doExtraRangesForChildren(curr, scanner); }
	private static void doExtraRangesForChildren(ASTNode node, TokenScanner scanner) {		List children= ASTNodes.getChildren(node);				int lastChild= children.size() - 1;		int lastPos= node.getStartPosition() + node.getLength();				int prev= node.getStartPosition();		for (int i= 0; i <= lastChild; i++) {			ASTNode curr= (ASTNode) children.get(i);			int next= (i < lastChild) ? ((ASTNode) children.get(i + 1)).getStartPosition() : lastPos;			ISourceRange range= ASTNodes.getNodeRangeWithComments(curr, prev, next, scanner);			curr.setProperty(NODE_RANGE_PROPERTY, range);			doExtraRangesForChildren(curr, scanner);			prev= range.getOffset() + range.getLength();		}	}