code: private static Node getNextSiblingOfType(Node first, Token ... types) {
      for (Node c = first; c != null; c = c.getNext()) {
        for (Token type : types) {
          if (c.getToken() == type) {
            return c;
          }
        }
      }
      return null;
    }
docs: Get the next sibling (including itself) of one of the given types.