public int getAbsolutePosition ( ) { int pos = position ; AstNode parent = this . parent ; while ( parent != null ) { pos += parent . getPosition ( ) ; parent = parent . getParent ( ) ; } return pos ; }
Returns the absolute document position of the node . Computes it by adding the node s relative position to the relative positions of all its parents .