code: public void setBody(AstNode body) {
          this.body = body;
          int end = body.getPosition() + body.getLength();
          this.setLength(end - this.getPosition());
          body.setParent(this);
      }
docs: Sets loop body.  Sets the parent of the body to this loop node,
  and updates its offset to be relative.  Extends the length of this
  node to include the body.